summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathis Rosenhauer <rosenhauer@dkrz.de>2017-07-17 07:12:08 (GMT)
committerMathis Rosenhauer <rosenhauer@dkrz.de>2017-07-17 09:47:13 (GMT)
commit912eba27fbfecb35de79ed3c82d4d3b576352926 (patch)
treef06eb3aaa04580932c535d8113a12f20f4c960d4
parent8880310be431f419fded62edefac14e4ffd48739 (diff)
downloadlibaec-912eba27fbfecb35de79ed3c82d4d3b576352926.zip
libaec-912eba27fbfecb35de79ed3c82d4d3b576352926.tar.gz
libaec-912eba27fbfecb35de79ed3c82d4d3b576352926.tar.bz2
Fix warnings
-rw-r--r--src/decode.c2
-rw-r--r--src/utime.c4
-rw-r--r--tests/check_aec.c6
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");