[libcxx-commits] [PATCH] D112927: [libc++] Enable -Wformat-nonliteral when building libc++
Mikael Holmén via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 15 02:57:20 PST 2021
uabelho added a comment.
In D112927#3123920 <https://reviews.llvm.org/D112927#3123920>, @uabelho wrote:
> Hi,
>
> I see a whole bunch of warnings like this with this patch:
>
> /repo/uabelho/llvm-dev2/llvm/build-all-builtins/runtimes/runtimes-i386-unknown-linux-gnu-bins/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/include/c++/v1/__bsd_locale_fallbacks.h:116:37: warning: format string is not a string literal [-Wformat-nonliteral]
> int __res = vsnprintf(__s, __n, __format, __va);
> ^~~~~~~~
> /repo/uabelho/llvm-dev2/llvm/build-all-builtins/runtimes/runtimes-i386-unknown-linux-gnu-bins/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/include/c++/v1/__bsd_locale_fallbacks.h:126:32: warning: format string is not a string literal [-Wformat-nonliteral]
> int __res = vasprintf(__s, __format, __va);
> ^~~~~~~~
> /repo/uabelho/llvm-dev2/llvm/build-all-builtins/runtimes/runtimes-i386-unknown-linux-gnu-bins/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/include/c++/v1/__bsd_locale_fallbacks.h:136:30: warning: format string is not a string literal [-Wformat-nonliteral]
> int __res = vsscanf(__s, __format, __va);
> ^~~~~~~~
> 3 warnings generated.
>
> Both with clang 8 and gcc 9.3
I put up
https://reviews.llvm.org/D113876
to silence the warnings
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112927/new/
https://reviews.llvm.org/D112927
More information about the libcxx-commits
mailing list