diff options
author | Pekka Seppänen <pexu@gcc.mail.kapsi.fi> | 2023-09-07 22:30:00 +0300 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-09-11 12:36:18 +0100 |
commit | 390fa3a78c84d97783afda9278df70d4a4ac2471 (patch) | |
tree | d20fcb0d2d7a106e0d1b7513e94aa7ea6675293a | |
parent | 5c3c04960d773f47ba5b1da592b6f1e013efe3ea (diff) | |
download | gcc-390fa3a78c84d97783afda9278df70d4a4ac2471.zip gcc-390fa3a78c84d97783afda9278df70d4a4ac2471.tar.gz gcc-390fa3a78c84d97783afda9278df70d4a4ac2471.tar.bz2 |
libstdc++: Fix -Wunused-parameter warnings
Fix -Wunused-parameter warnings when _GLIBCXX_USE_WCHAR_T is not
defined.
libstdc++-v3/ChangeLog:
* src/c++11/cow-locale_init.cc: Add [[maybe_unused]] attribute.
* src/c++17/fs_path.cc (path::_S_convert_loc): Likewise.
* src/filesystem/path.cc (path::_S_convert_loc): Likewise.
Signed-off-by: Pekka Seppänen <pexu@gcc.mail.kapsi.fi>
-rw-r--r-- | libstdc++-v3/src/c++11/cow-locale_init.cc | 5 | ||||
-rw-r--r-- | libstdc++-v3/src/c++17/fs_path.cc | 2 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/path.cc | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/libstdc++-v3/src/c++11/cow-locale_init.cc b/libstdc++-v3/src/c++11/cow-locale_init.cc index 8527776..f48561f 100644 --- a/libstdc++-v3/src/c++11/cow-locale_init.cc +++ b/libstdc++-v3/src/c++11/cow-locale_init.cc @@ -137,8 +137,9 @@ namespace } void - locale::_Impl::_M_init_extra(void* cloc, void* clocm, - const char* __s, const char* __smon) + locale::_Impl::_M_init_extra(void* cloc, [[maybe_unused]] void* clocm, + const char* __s, + [[maybe_unused]] const char* __smon) { auto& __cloc = *static_cast<__c_locale*>(cloc); diff --git a/libstdc++-v3/src/c++17/fs_path.cc b/libstdc++-v3/src/c++17/fs_path.cc index aaea7d2..d65b548 100644 --- a/libstdc++-v3/src/c++17/fs_path.cc +++ b/libstdc++-v3/src/c++17/fs_path.cc @@ -1947,7 +1947,7 @@ path::_M_split_cmpts() path::string_type path::_S_convert_loc(const char* __first, const char* __last, - const std::locale& __loc) + [[maybe_unused]] const std::locale& __loc) { #if _GLIBCXX_USE_WCHAR_T auto& __cvt = std::use_facet<codecvt<wchar_t, char, mbstate_t>>(__loc); diff --git a/libstdc++-v3/src/filesystem/path.cc b/libstdc++-v3/src/filesystem/path.cc index 4c218bd..d04ba6d 100644 --- a/libstdc++-v3/src/filesystem/path.cc +++ b/libstdc++-v3/src/filesystem/path.cc @@ -498,7 +498,7 @@ path::_M_trim() path::string_type path::_S_convert_loc(const char* __first, const char* __last, - const std::locale& __loc) + [[maybe_unused]] const std::locale& __loc) { #if _GLIBCXX_USE_WCHAR_T auto& __cvt = std::use_facet<codecvt<wchar_t, char, mbstate_t>>(__loc); |