cast sizeof() to unsigned to avoid warnings on 64-bit
authorEric Wong <normalperson@yhbt.net>
Sun, 9 Aug 2009 21:42:44 +0000 (9 14:42 -0700)
committerEric Wong <normalperson@yhbt.net>
Sun, 9 Aug 2009 21:42:44 +0000 (9 14:42 -0700)
I doubt we'll ever see sizeof() returning a value larger than
UINT_MAX...

compat-util.h

index 8b70b52..00f2fee 100644 (file)
@@ -51,7 +51,7 @@ static off_t cstr_to_off_t(const char *nptr, char **endptr, int base)
                return (off_t)strtoll(nptr, endptr, base);
 
        fprintf(stderr, "unrecognized sizes:\n\toff_t: %u\n\tlong: %u\n",
-                       sizeof(off_t), sizeof(long));
+                       (unsigned)sizeof(off_t), (unsigned)sizeof(long));
        exit(1);
 }