Commit 912eba27 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

Fix warnings

parent 8880310b
...@@ -520,7 +520,7 @@ static int m_zero_block(struct aec_stream *strm) ...@@ -520,7 +520,7 @@ static int m_zero_block(struct aec_stream *strm)
if (zero_blocks == ROS) { if (zero_blocks == ROS) {
int b = (int)RSI_USED_SIZE(state) / strm->block_size; 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) { } else if (zero_blocks > ROS) {
zero_blocks--; zero_blocks--;
} }
......
...@@ -67,7 +67,8 @@ run_cmd(int argc, char *argv[]); ...@@ -67,7 +67,8 @@ run_cmd(int argc, char *argv[]);
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
struct timeval utime = { .tv_sec = 0, .tv_usec = 0 }; 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)) if (argc > 1 && ((status = run_cmd(argc - 1, argv + 1)) >= 0))
{ {
struct rusage usage; struct rusage usage;
...@@ -120,4 +121,3 @@ run_cmd(int argc, char *argv[]) ...@@ -120,4 +121,3 @@ run_cmd(int argc, char *argv[])
} }
return status; return status;
} }
...@@ -175,7 +175,7 @@ int encode_decode_small(struct test_state *state) ...@@ -175,7 +175,7 @@ int encode_decode_small(struct test_state *state)
printf("\n"); printf("\n");
printf("%02x ", state->ubuf[i]); 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++) { for (int i = 0; i < 80; i++) {
if (i % 8 == 0) if (i % 8 == 0)
printf("\n"); printf("\n");
...@@ -197,7 +197,7 @@ int encode_decode_small(struct test_state *state) ...@@ -197,7 +197,7 @@ int encode_decode_small(struct test_state *state)
int encode_decode_large(struct test_state *state) int encode_decode_large(struct test_state *state)
{ {
int status; int status;
int bflags; int bflags = 0;
size_t to; size_t to;
char fbase[1024]; char fbase[1024];
struct aec_stream *strm = state->strm; struct aec_stream *strm = state->strm;
...@@ -290,7 +290,7 @@ int encode_decode_large(struct test_state *state) ...@@ -290,7 +290,7 @@ int encode_decode_large(struct test_state *state)
printf("\n"); printf("\n");
printf("%02x ", state->ubuf[i]); 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++) { for (int i = 0; i < 80; i++) {
if (i % 8 == 0) if (i % 8 == 0)
printf("\n"); printf("\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment