diff options
author | Gwenole Beauchesne <gb.devel@gmail.com> | 2023-12-06 15:34:44 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2024-01-06 15:11:33 +0000 |
commit | ff981616a6093b7075581c45ad6240d86ebe6f3e (patch) | |
tree | 3209366a7fbaabf39da5e86b0e286a544cb25a3f | |
parent | 723bd722d616bbb427264930986f080d89207caa (diff) | |
download | gcc-ff981616a6093b7075581c45ad6240d86ebe6f3e.zip gcc-ff981616a6093b7075581c45ad6240d86ebe6f3e.tar.gz gcc-ff981616a6093b7075581c45ad6240d86ebe6f3e.tar.bz2 |
libstdc++: Fix testsuite with -Wformat
Fix testsuite when compiling with -Wformat. Use nonnull arguments so
that -Wformat does not cause extraneous output to be reported as an
error.
FAIL: tr1/8_c_compatibility/cinttypes/functions.cc (test for excess errors)
libstdc++-v3/ChangeLog:
* testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Use
nonnull arguments to strtoimax() and wcstoimax() functions.
Signed-off-by: Gwenole Beauchesne <gb.devel@gmail.com>
-rw-r--r-- | libstdc++-v3/testsuite/tr1/8_c_compatibility/cinttypes/functions.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cinttypes/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cinttypes/functions.cc index e9eec57..b9a34d0 100644 --- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cinttypes/functions.cc +++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cinttypes/functions.cc @@ -29,10 +29,10 @@ void test01() #if _GLIBCXX_USE_C99_INTTYPES_TR1 std::tr1::intmax_t i = 0, numer = 0, denom = 0, base = 0; - const char* s = 0; + const char* s = "0"; char** endptr = 0; #if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 - const wchar_t* ws = 0; + const wchar_t* ws = L"0"; wchar_t** wendptr = 0; #endif |