[PATCH 2/3] Fix printf() format

Ben Gamari bgamari.foss at gmail.com
Sun Jun 14 00:06:28 PDT 2009


Fix compiler warning:

imLcIm.c:364: warning: format ‘%03x’ expects type ‘unsigned int’, but argument 6 has type ‘long unsigned int’
imLcIm.c:367: warning: format ‘%03x’ expects type ‘unsigned int’, but argument 6 has type ‘long unsigned int’
---
 modules/im/ximcp/imLcIm.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/im/ximcp/imLcIm.c b/modules/im/ximcp/imLcIm.c
index 17121b5..e398112 100644
--- a/modules/im/ximcp/imLcIm.c
+++ b/modules/im/ximcp/imLcIm.c
@@ -363,11 +363,11 @@ Private int _XimCachedFileName (
     *res  = Xmalloc (len + 1 + 27 + 1);  /* Max VERSION 9999 */
 
     if (len == 0 || dir [len-1] != '/')
-       sprintf (*res, "%s/%c%d_%03x_%08x_%08x", dir, _XimGetMyEndian(),
-		XIM_CACHE_VERSION, sizeof (DefTree), hash, hash2);
+       sprintf (*res, "%s/%c%d_%03lx_%08x_%08x", dir, _XimGetMyEndian(),
+		XIM_CACHE_VERSION, sizeof(DefTree), hash, hash2);
     else
-       sprintf (*res, "%s%c%d_%03x_%08x_%08x", dir, _XimGetMyEndian(),
-		XIM_CACHE_VERSION, sizeof (DefTree), hash, hash2);
+       sprintf (*res, "%s%c%d_%03lx_%08x_%08x", dir, _XimGetMyEndian(),
+		XIM_CACHE_VERSION, sizeof(DefTree), hash, hash2);
 
 /* fprintf (stderr, "-> %s\n", *res); */
     if ( (fd = _XOpenFile (*res, O_RDONLY)) == -1)
-- 
1.6.3.1




More information about the xorg mailing list