maint: avoid three warnings from the very latest gcc-built-from-git
authorJim Meyering <meyering@fb.com>
Mon, 2 Nov 2015 05:58:42 +0000 (21:58 -0800)
committerJim Meyering <meyering@fb.com>
Mon, 2 Nov 2015 06:00:17 +0000 (22:00 -0800)
* unzip.c (unzip): Correct two format strings to match the types of the corresponding arguments.
* unlzw.c (unlzw): Cast an "int" to unsigned to match expected type of %x.

unlzw.c
unzip.c

diff --git a/unlzw.c b/unlzw.c
index 867c0eadd65de1605f734638ff54d30581385e09..69a47b45a9477e97deb048ad222e4bbd79e3aed8 100644 (file)
--- a/unlzw.c
+++ b/unlzw.c
@@ -123,7 +123,7 @@ int unlzw(in, out)
     block_mode = maxbits & BLOCK_MODE;
     if ((maxbits & LZW_RESERVED) != 0) {
         WARN((stderr, "\n%s: %s: warning, unknown flags 0x%x\n",
-              program_name, ifname, maxbits & LZW_RESERVED));
+              program_name, ifname, (unsigned int) maxbits & LZW_RESERVED));
     }
     maxbits &= BIT_MASK;
     maxmaxcode = MAXCODE(maxbits);
diff --git a/unzip.c b/unzip.c
index ec3adf1f27346f498443d84df3c8ca1fa76eb78f..50cdf5d6da34fabc514b00b0daab93a480c3e87b 100644 (file)
--- a/unzip.c
+++ b/unzip.c
@@ -143,7 +143,7 @@ int unzip(in, out)
 
         if (n != LG(inbuf + LOCSIZ) - (decrypt ? RAND_HEAD_LEN : 0)) {
 
-            fprintf(stderr, "len %ld, siz %ld\n", n, LG(inbuf + LOCSIZ));
+            fprintf(stderr, "len %lu, siz %lu\n", n, LG(inbuf + LOCSIZ));
             gzip_error ("invalid compressed data--length mismatch");
         }
         while (n--) {