From f7864927f2297b69b539bb92f695664393d64662 Mon Sep 17 00:00:00 2001 From: Tiiffi Date: Thu, 20 Jun 2013 11:53:50 +0300 Subject: [PATCH] Corrected printf formatting. Wrong formatting specifiers were causing compiler warnings. --- inhal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inhal.c b/inhal.c index d527b12..c5539aa 100644 --- a/inhal.c +++ b/inhal.c @@ -75,7 +75,7 @@ int main (int argc, char **argv) { fseek(infile, 0, SEEK_END); inputsize = ftell(infile); - printf("Uncompressed size: %d bytes\n", inputsize); + printf("Uncompressed size: %zd bytes\n", inputsize); if (inputsize > DATA_SIZE) { printf("Error: File must be a maximum of 65,536 bytes!\n"); @@ -94,11 +94,11 @@ int main (int argc, char **argv) { fseek(outfile, fileoffset, SEEK_SET); fwrite((const void*)packed, 1, outputsize, outfile); - printf("Compressed size: %d bytes\n", outputsize); + printf("Compressed size: %zd bytes\n", outputsize); printf("Compression ratio: %4.2f%%\n", 100 * (double)outputsize / inputsize); printf("Compression time: %4.3f seconds\n\n", (double)time / CLOCKS_PER_SEC); - printf("Inserted at 0x%06X - 0x%06X\n", fileoffset, ftell(outfile) - 1); + printf("Inserted at 0x%06X - 0x%06lX\n", fileoffset, ftell(outfile) - 1); fclose(infile); fclose(outfile);