From 912eba27fbfecb35de79ed3c82d4d3b576352926 Mon Sep 17 00:00:00 2001 From: Mathis Rosenhauer Date: Mon, 17 Jul 2017 09:12:08 +0200 Subject: Fix warnings --- src/decode.c | 2 +- src/utime.c | 4 ++-- tests/check_aec.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/decode.c b/src/decode.c index 92b0657..eeefa87 100644 --- a/src/decode.c +++ b/src/decode.c @@ -520,7 +520,7 @@ static int m_zero_block(struct aec_stream *strm) if (zero_blocks == ROS) { int b = (int)RSI_USED_SIZE(state) / strm->block_size; - zero_blocks = MIN(strm->rsi - b, 64 - (b % 64)); + zero_blocks = MIN((int)(strm->rsi - b), 64 - (b % 64)); } else if (zero_blocks > ROS) { zero_blocks--; } diff --git a/src/utime.c b/src/utime.c index 95263fc..772bb76 100644 --- a/src/utime.c +++ b/src/utime.c @@ -67,7 +67,8 @@ run_cmd(int argc, char *argv[]); int main(int argc, char **argv) { struct timeval utime = { .tv_sec = 0, .tv_usec = 0 }; - int status, rstatus; + int rstatus; + int status = 0; if (argc > 1 && ((status = run_cmd(argc - 1, argv + 1)) >= 0)) { struct rusage usage; @@ -120,4 +121,3 @@ run_cmd(int argc, char *argv[]) } return status; } - diff --git a/tests/check_aec.c b/tests/check_aec.c index b0bb73d..354f357 100644 --- a/tests/check_aec.c +++ b/tests/check_aec.c @@ -175,7 +175,7 @@ int encode_decode_small(struct test_state *state) printf("\n"); printf("%02x ", state->ubuf[i]); } - printf("\n\ncompressed buf len %li", compressed_size); + printf("\n\ncompressed buf len %zu", compressed_size); for (int i = 0; i < 80; i++) { if (i % 8 == 0) printf("\n"); @@ -197,7 +197,7 @@ int encode_decode_small(struct test_state *state) int encode_decode_large(struct test_state *state) { int status; - int bflags; + int bflags = 0; size_t to; char fbase[1024]; struct aec_stream *strm = state->strm; @@ -290,7 +290,7 @@ int encode_decode_large(struct test_state *state) printf("\n"); printf("%02x ", state->ubuf[i]); } - printf("\n\ncompressed buf len %li", to); + printf("\n\ncompressed buf len %zu", to); for (int i = 0; i < 80; i++) { if (i % 8 == 0) printf("\n"); -- cgit v1.2.3