-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MinGW] Disable GCC warning about using MS format specifiers in ISO C conformant code #1362
Conversation
Codecov ReportBase: 83.26% // Head: 83.25% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #1362 +/- ##
===========================================
- Coverage 83.26% 83.25% -0.01%
===========================================
Files 128 128
Lines 10639 10639
Branches 2712 2712
===========================================
- Hits 8859 8858 -1
Misses 1115 1115
- Partials 665 666 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I kind of think we should change the |
|
Looks like we already do use inttypes.h. Here are the warnings. zlib-ng/test/infcover.c: In function ‘mem_used’:
zlib-ng/test/infcover.c:1[83](https://github.com/zlib-ng/zlib-ng/actions/runs/3289136191/jobs/5420314359#step:11:84):21: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
183 | fprintf(stderr, "%s: %" PRIu64 " allocated\n", prefix, (uint64_t)zone->total);
| ^~~~~~~
zlib-ng/test/infcover.c:183:21: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
zlib-ng/test/infcover.c: In function ‘mem_high’:
zlib-ng/test/infcover.c:190:21: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
190 | fprintf(stderr, "%s: %" PRIu64 " high water mark\n", prefix, (uint64_t)zone->highwater);
| ^~~~~~~
zlib-ng/test/infcover.c:190:21: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
zlib-ng/test/infcover.c: In function ‘mem_done’:
zlib-ng/test/infcover.c:214:25: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
214 | fprintf(stderr, "** %s: %" PRIu64 " bytes in %d blocks not freed\n",
| ^~~~~~~~~~
zlib-ng/test/infcover.c:214:25: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
zlib-ng/tools/makecrct.c: In function ‘write_table64’:
zlib-ng/tools/makecrct.c:143:16: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
143 | printf("%s0x%016" PRIx64 "%s", n == 0 || n % 3 ? "" : " ",
| ^~~~~~~~~~
zlib-ng/tools/makecrct.c:143:16: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
zlib-ng/test/fuzz/fuzzer_example_large.c: In function ‘test_large_inflate’:
zlib-ng/test/fuzz/fuzzer_example_large.c:108:25: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=]
108 | fprintf(stderr, "bad large inflate: %" PRIu64 "\n", (uint64_t)d_stream.total_out);
| ^~~~~~~~~~~~~~~~~~~~~~
zlib-ng/test/fuzz/fuzzer_example_large.c:108:25: warning: ISO C does not support the ‘I64’ ms_printf length modifier [-Wformat=] |
Looks good. I'm not so sure we need the |
We should only need to specify values on command-line that are higher than the defaults we assume in headers. The most common reason is when one operating system or toolset requires higher version than others, as we need to make sure the definition is correct before including any system headers. I try to make cleanup related pull requests once in a while so we have as little warnings emitted as possible when we are preparing a new release. My main focus has been VC++, MinGW, MSYS and Cygwin since the early days, but I will also participate in some arch-dependent issues and features. |
Changes since 2.0.6: - Fix CVE-2022-37434 #1328 - Fix chunkmemset #1196 - Fix deflateBound too small #1236 - Fix Z_SOLO #1263 - Fix ACLE variant of crc32 #1274 - Fix inflateBack #1311 - Fix deflate_quick windowsize #1431 - Fix DFLTCC bugs related to adler32 #1349 and #1390 - Fix warnings #1194 #1312 #1362 - MacOS build fix #1198 - Add invalid windowBits handling #1293 - Support for Force TZCNT #1186 - Support for aligned_alloc() #1360 - Minideflate improvements #1175 #1238 - Dont use unaligned access for memcpy #1309 - Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365 - Test improvements #1208 #1227 #1241 #1353 - Cleanup #1266 - Documentation #1205 #1359 - Misc improvements #1294 #1297 #1306 #1344 #1348 - Backported zlib fixes - Backported CI workflows from Develop branch
Changes since 2.0.6: - Fix CVE-2022-37434 #1328 - Fix chunkmemset #1196 - Fix deflateBound too small #1236 - Fix Z_SOLO #1263 - Fix ACLE variant of crc32 #1274 - Fix inflateBack #1311 - Fix deflate_quick windowsize #1431 - Fix DFLTCC bugs related to adler32 #1349 and #1390 - Fix warnings #1194 #1312 #1362 - MacOS build fix #1198 - Add invalid windowBits handling #1293 - Support for Force TZCNT #1186 - Support for aligned_alloc() #1360 - Minideflate improvements #1175 #1238 - Dont use unaligned access for memcpy #1309 - Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365 - Test improvements #1208 #1227 #1241 #1353 - Cleanup #1266 - Documentation #1205 #1359 - Misc improvements #1294 #1297 #1306 #1344 #1348 - Backported zlib fixes - Backported CI workflows from Develop branch
-Wno-pedantic-ms-format
was introduced in GCC 4.5 for MinGW, so we don't need to test if that is supported as minimum we support is GCC 4.8.