Gerald Pfeifer : wpp: Add explicit casts when mixing signed and unsigned integers.
Alexandre Julliard
julliard at winehq.org
Thu Apr 7 07:36:53 CDT 2011
Module: wine
Branch: stable
Commit: d987cecd4fe93802e66eccce506b5c01f992775a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d987cecd4fe93802e66eccce506b5c01f992775a
Author: Gerald Pfeifer <gerald at pfeifer.com>
Date: Wed Feb 16 02:50:46 2011 +0100
wpp: Add explicit casts when mixing signed and unsigned integers.
(cherry picked from commit 7a3226be4696a01ddf4f9fe8494224455a6c9a0a)
---
libs/wpp/ppy.y | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/wpp/ppy.y b/libs/wpp/ppy.y
index 5f1566e..b50e120 100644
--- a/libs/wpp/ppy.y
+++ b/libs/wpp/ppy.y
@@ -59,7 +59,7 @@
if(cv_signed(v1) && cv_signed(v2)) \
r.val.si = v1.val.si OP v2.val.si; \
else if(cv_signed(v1) && !cv_signed(v2)) \
- r.val.si = v1.val.si OP v2.val.ui; \
+ r.val.si = v1.val.si OP (signed) v2.val.ui; \
else if(!cv_signed(v1) && cv_signed(v2)) \
r.val.si = v1.val.ui OP v2.val.si; \
else \
@@ -70,7 +70,7 @@
if(cv_signed(v1) && cv_signed(v2)) \
r.val.sl = v1.val.sl OP v2.val.sl; \
else if(cv_signed(v1) && !cv_signed(v2)) \
- r.val.sl = v1.val.sl OP v2.val.ul; \
+ r.val.sl = v1.val.sl OP (signed long) v2.val.ul; \
else if(!cv_signed(v1) && cv_signed(v2)) \
r.val.sl = v1.val.ul OP v2.val.sl; \
else \
@@ -81,7 +81,7 @@
if(cv_signed(v1) && cv_signed(v2)) \
r.val.sll = v1.val.sll OP v2.val.sll; \
else if(cv_signed(v1) && !cv_signed(v2)) \
- r.val.sll = v1.val.sll OP v2.val.ull; \
+ r.val.sll = v1.val.sll OP (wrc_sll_t) v2.val.ull; \
else if(!cv_signed(v1) && cv_signed(v2)) \
r.val.sll = v1.val.ull OP v2.val.sll; \
else \
More information about the wine-cvs
mailing list