summaryrefslogtreecommitdiff
path: root/header.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 /header.c
parente9faac187bfa7ecd669c5fd68fc989641117d8bd (diff)
Fix integer sign/size conversion warnings from clang & cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'header.c')
-rw-r--r--header.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/header.c b/header.c
index 31814e6..1892276 100644
--- a/header.c
+++ b/header.c
@@ -66,17 +66,17 @@ static const char *warning[] =
static char *
FindStringProperty(const char *propName,
- int *propLength,
+ unsigned int *propLength,
FSPropInfo *propInfo,
FSPropOffset *propOffsets,
unsigned char *propData)
{
FSPropOffset *propOffset;
- int length;
- int i;
+ unsigned int length;
+ unsigned int i;
propOffset = &propOffsets[0];
- length = strlen(propName);
+ length = (unsigned int) strlen(propName);
for (i = propInfo->num_offsets; i--; propOffset++) {
if (propOffset->type == PropTypeString) {
@@ -109,11 +109,11 @@ FindNumberProperty(const char *propName,
unsigned char *propData)
{
FSPropOffset *propOffset;
- int i;
- int length;
+ unsigned int i;
+ unsigned int length;
propOffset = &propOffsets[0];
- length = strlen(propName);
+ length = (unsigned int) strlen(propName);
for (i = propInfo->num_offsets; i--; propOffset++) {
if ((propOffset->type == PropTypeSigned) ||
(propOffset->type == PropTypeUnsigned)) {
@@ -138,7 +138,7 @@ EmitHeader(FILE *outFile,
FSPropOffset *propOffsets,
unsigned char *propData)
{
- int len;
+ unsigned int len;
int type;
char *cp;
const char **cpp;