From 6bfbf81717c7bee5ae846e38ecf6af1ff1775d11 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 1 Nov 2015 21:58:42 -0800 Subject: [PATCH] maint: avoid three warnings from the very latest gcc-built-from-git * 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 | 2 +- unzip.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unlzw.c b/unlzw.c index 867c0ea..69a47b4 100644 --- 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 ec3adf1..50cdf5d 100644 --- 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--) { -- 2.6.0