diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-07-05 14:47:00 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-07-05 14:49:20 -0700 |
commit | 11b1eba90baecf41b9e54b32827be864f0823469 (patch) | |
tree | a80642b418c9c3ee268072a45e36ec96ba0c5cfd /props.c | |
parent | e9faac187bfa7ecd669c5fd68fc989641117d8bd (diff) |
Fix integer sign/size conversion warnings from clang & cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'props.c')
-rw-r--r-- | props.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -48,7 +48,7 @@ in this Software without prior written authorization from The Open Group. #include "fstobdf.h" static char * -AddQuotes(unsigned char *string, int length) +AddQuotes(unsigned char *string, unsigned int length) { static unsigned char new[256] = "\""; unsigned char *cp; @@ -72,7 +72,7 @@ EmitProperties(FILE *outFile, FSPropOffset *propOffsets, unsigned char *propData) { - int nProperties; + unsigned int nProperties; FSPropOffset *property; Bool needDefaultChar; Bool needFontAscent; @@ -85,7 +85,7 @@ EmitProperties(FILE *outFile, nProperties = propInfo->num_offsets; for (property = &propOffsets[0]; nProperties--; property++) { char *name; - int length; + unsigned int length; name = (char *)propData + property->name.position; length = property->name.length; @@ -122,7 +122,7 @@ EmitProperties(FILE *outFile, fprintf(outFile, "%lu\n", value); break; case PropTypeSigned: - fprintf(outFile, "%ld\n", value); + fprintf(outFile, "%ld\n", (signed long) value); break; default: fprintf(stderr, "unknown property type\n"); |