]> granicus.if.org Git - strace/commitdiff
Explicitly cast argument of XLAT macro to unsigned int
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 28 Apr 2016 23:52:28 +0000 (23:52 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 29 Apr 2016 00:15:01 +0000 (00:15 +0000)
This is necessary for the upcoming change of xlat.val type.

* xlat.h (XLAT): Cast the argument to unsigned int.

xlat.h

diff --git a/xlat.h b/xlat.h
index 28f7402770e2c22eb40dc43ca1fd5dc69c94c7bc..95d9355f68c9b12a68ebd052d70a09cd94275080 100644 (file)
--- a/xlat.h
+++ b/xlat.h
@@ -5,7 +5,7 @@ struct xlat {
        const char *str;
 };
 
-# define XLAT(x) { x, #x }
-# define XLAT_END { 0, 0 }
+# define XLAT(val)                     { (unsigned)(val), #val }
+# define XLAT_END                      {               0, 0    }
 
 #endif