summaryrefslogtreecommitdiff
path: root/props.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-07-05 14:47:00 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-07-05 14:49:20 -0700
commit11b1eba90baecf41b9e54b32827be864f0823469 (patch)
treea80642b418c9c3ee268072a45e36ec96ba0c5cfd /props.c
parente9faac187bfa7ecd669c5fd68fc989641117d8bd (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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/props.c b/props.c
index 465bea8..333491f 100644
--- a/props.c
+++ b/props.c
@@ -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");