From 97a0f5f4aa89ddd940f9fc15779534ebb9ac630a Mon Sep 17 00:00:00 2001 From: pwpiwi Date: Sun, 31 May 2015 19:51:44 +0200 Subject: [PATCH] fix format strings for nit picking compilers --- client/fpga_compress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/fpga_compress.c b/client/fpga_compress.c index 5f4d23d4..f7333b36 100644 --- a/client/fpga_compress.c +++ b/client/fpga_compress.c @@ -96,8 +96,8 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) } } - if (i > num_infiles * FPGA_CONFIG_SIZE) { - fprintf(stderr, "Input files too big (total of %ld > %d bytes). These are probably not PM3 FPGA config files.", i, num_infiles*FPGA_CONFIG_SIZE); + if (i >= num_infiles * FPGA_CONFIG_SIZE) { + fprintf(stderr, "Input files too big (total > %lu bytes). These are probably not PM3 FPGA config files.", num_infiles*FPGA_CONFIG_SIZE); for(uint16_t j = 0; j < num_infiles; j++) { fclose(infile[j]); } @@ -136,7 +136,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) ret = deflate(&compressed_fpga_stream, Z_FINISH); } - fprintf(stderr, "compressed %d input bytes to %d output bytes\n", i, compressed_fpga_stream.total_out); + fprintf(stderr, "compressed %lu input bytes to %lu output bytes\n", i, compressed_fpga_stream.total_out); if (ret != Z_STREAM_END) { fprintf(stderr, "Error in deflate(): %d %s\n", ret, compressed_fpga_stream.msg); -- 2.39.5