Skip to content

Commit 57fcc3f

Browse files
committed
Limit verbosity number when populating the warning level string
Fixes CI failure: /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:35: note: ‘__builtin___snprintf_chk’ output between 5 and 11 bytes into a destination of size 5 64 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 65 | __bos (__s), __fmt, __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors CMakeFiles/loguru_test.dir/build.make:75: recipe for target 'CMakeFiles/loguru_test.dir/loguru_test.cpp.o' failed make[2]: *** [CMakeFiles/loguru_test.dir/loguru_test.cpp.o] Error 1 CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/loguru_test.dir/all' failed make[1]: *** [CMakeFiles/loguru_test.dir/all] Error 2 Makefile:100: recipe for target 'all' failed make: *** [all] Error 2 CMake Error at test/appveyor.cmake:22 (_message):
1 parent a9f232d commit 57fcc3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

loguru.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ namespace loguru
13171317
if (custom_level_name) {
13181318
snprintf(level_buff, sizeof(level_buff) - 1, "%s", custom_level_name);
13191319
} else {
1320-
snprintf(level_buff, sizeof(level_buff) - 1, "% 4d", verbosity);
1320+
snprintf(level_buff, sizeof(level_buff) - 1, "%4d", static_cast<int>(verbosity) % 9999);
13211321
}
13221322

13231323
size_t pos = 0;

0 commit comments

Comments
 (0)