From: Nathan Moinvaziri Date: Mon, 6 Jun 2022 23:18:19 +0000 (-0700) Subject: Fixed signed warnings in GZ unit tests. X-Git-Tag: 2.1.0-beta1~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f878d036f8c418ea41721895cb6ba31a2f0f3a6;p=thirdparty%2Fzlib-ng.git Fixed signed warnings in GZ unit tests. test_gzio.cc(44): warning C4389: '!=': signed/unsigned mismatch test_gzio.cc(72): warning C4389: '!=': signed/unsigned mismatch --- diff --git a/test/test_gzio.cc b/test/test_gzio.cc index 46baa028e..59e46f520 100644 --- a/test/test_gzio.cc +++ b/test/test_gzio.cc @@ -41,7 +41,7 @@ TEST(gzip, readwrite) { EXPECT_GE(PREFIX(gzseek)(file, 1L, SEEK_CUR), 0); /* Write hello, hello! using gzfwrite using best compression level */ EXPECT_EQ(PREFIX(gzsetparams)(file, Z_BEST_COMPRESSION, Z_DEFAULT_STRATEGY), Z_OK); - EXPECT_NE(PREFIX(gzfwrite)(hello, hello_len, 1, file), 0); + EXPECT_NE(PREFIX(gzfwrite)(hello, hello_len, 1, file), 0UL); /* Flush compressed bytes to file */ EXPECT_EQ(PREFIX(gzflush)(file, Z_SYNC_FLUSH), Z_OK); compr_len = (uint32_t)PREFIX(gzoffset)(file); @@ -69,7 +69,7 @@ TEST(gzip, readwrite) { /* Read first hello, hello! string with gzgets */ strcpy((char*)uncompr, "garbages"); PREFIX(gzgets)(file, (char*)uncompr, (int)uncompr_len); - EXPECT_EQ(strlen((char*)uncompr), 7); /* " hello!" */ + EXPECT_EQ(strlen((char*)uncompr), 7UL); /* " hello!" */ EXPECT_STREQ((char*)uncompr, hello + 6); /* Seek to second hello, hello! string */