Fix an integer-type mismatch between %04x in a printf format string
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 3 May 2012 18:20:39 +0000 (18:20 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 3 May 2012 18:20:39 +0000 (18:20 +0000)
and a long int. Spotted by Ubuntu 12.04's gcc, and probably would have
caused trouble on 64-bit machines.

git-svn-id: svn://svn.tartarus.org/sgt/charset@9489 cda61777-01e9-0310-a592-d414129be87e

cstable.c

index 509923a..f08607e 100644 (file)
--- a/cstable.c
+++ b/cstable.c
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
        int i, plane, row, col, chr;
        char const *sep = "";
 
-       printf("U+%04x:", c);
+       printf("U+%04x:", (unsigned)c);
 
        /*
         * Look up in SBCSes.