diff options
| author | Vladislav Shchapov <vladislav@shchapov.ru> | 2023-02-18 00:02:49 +0500 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2023-02-23 12:17:07 +0100 |
| commit | 135641be1c125524564dd76ba97c2ff115384b43 (patch) | |
| tree | e33bfc1d1eadb8ffeabc024360646ce30bab2437 /test | |
| parent | fa9bfeddcf4a3624a95c82e48471308f68b5778f (diff) | |
| download | Project-Tick-135641be1c125524564dd76ba97c2ff115384b43.tar.gz Project-Tick-135641be1c125524564dd76ba97c2ff115384b43.zip | |
Fix warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Diffstat (limited to 'test')
| -rw-r--r-- | test/gh1235.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/gh1235.c b/test/gh1235.c index 472282d1ee..7bf8738f34 100644 --- a/test/gh1235.c +++ b/test/gh1235.c @@ -7,7 +7,7 @@ int main(void) { unsigned char plain[32]; unsigned char compressed[130]; PREFIX3(stream) strm; - int bound; + z_size_t bound; z_size_t bytes; for (int i = 0; i <= 32; i++) { @@ -21,7 +21,7 @@ int main(void) { strm.avail_out = sizeof(compressed); if (PREFIX(deflate)(&strm, Z_FINISH) != Z_STREAM_END) return -1; if (strm.avail_in != 0) return -1; - printf("bytes = %2i, deflateBound = %2i, total_out = %2zi\n", i, bound, strm.total_out); + printf("bytes = %2i, deflateBound = %2zi, total_out = %2zi\n", i, (size_t)bound, (size_t)strm.total_out); if (bound < strm.total_out) return -1; if (PREFIX(deflateEnd)(&strm) != Z_OK) return -1; } @@ -32,7 +32,7 @@ int main(void) { } bound = PREFIX(compressBound)(i); if (PREFIX(compress2)(compressed, &bytes, plain, i, 1) != Z_OK) return -1; - printf("bytes = %2i, compressBound = %2i, total_out = %2zi\n", i, bound, (size_t)bytes); + printf("bytes = %2i, compressBound = %2zi, total_out = %2zi\n", i, (size_t)bound, (size_t)bytes); if (bytes > bound) return -1; } return 0; |
