diff --git a/ChangeLog b/ChangeLog index fc492518b..b986cd61a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-11-26 Thomas Thurman + + * src/core/xprops.c: add casts (#562106) + 2008-11-25 Thomas Thurman * metacity.doap: change to standard description. diff --git a/src/core/xprops.c b/src/core/xprops.c index 7bb425710..d78012821 100644 --- a/src/core/xprops.c +++ b/src/core/xprops.c @@ -673,9 +673,9 @@ meta_prop_get_text_property (MetaDisplay *display, /* From Xmd.h */ #ifndef cvtINT32toInt #if SIZEOF_VOID_P == 8 -#define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val)) -#define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val)) -#define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val)) +#define cvtINT8toInt(val) ((((unsigned int)val) & 0x00000080) ? (((unsigned int)val) | 0xffffffffffffff00) : ((unsigned int)val)) +#define cvtINT16toInt(val) ((((unsigned int)val) & 0x00008000) ? (((unsigned int)val) | 0xffffffffffff0000) : ((unsigned int)val)) +#define cvtINT32toInt(val) ((((unsigned int)val) & 0x80000000) ? (((unsigned int)val) | 0xffffffff00000000) : ((unsigned int)val)) #define cvtINT8toShort(val) cvtINT8toInt(val) #define cvtINT16toShort(val) cvtINT16toInt(val) #define cvtINT32toShort(val) cvtINT32toInt(val)