summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas James Alexander Thurman <tthurman@src.gnome.org>2008-11-25 23:18:08 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2008-11-25 23:18:08 +0000
commitcf2206352f5a56baf1b8d203876ceb45d1ef625e (patch)
treeee57d615a26a8a82a9c19aba82d41e618b0f848d
parent4c5f125a6a24d1ace30fee45a7186c6faaf0b59d (diff)
downloadmetacity-cf2206352f5a56baf1b8d203876ceb45d1ef625e.tar.gz
metacity-cf2206352f5a56baf1b8d203876ceb45d1ef625e.tar.bz2
add casts (#562106)
* src/core/xprops.c: add casts (#562106) svn path=/trunk/; revision=4038
-rw-r--r--ChangeLog4
-rw-r--r--src/core/xprops.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index fc49251..b986cd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-26 Thomas Thurman <tthurman@gnome.org>
+
+ * src/core/xprops.c: add casts (#562106)
+
2008-11-25 Thomas Thurman <tthurman@gnome.org>
* metacity.doap: change to standard description.
diff --git a/src/core/xprops.c b/src/core/xprops.c
index 7bb4257..d780128 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)