libstdc++: Fix -Wunused-variable warning for -fno-exceptions build
authorJonathan Wakely <jwakely@redhat.com>
Wed, 2 Feb 2022 11:40:28 +0000 (11:40 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 2 Feb 2022 17:55:16 +0000 (17:55 +0000)
commit2905e1af94519b7ba3c43a57af8a7d5e10815950
tree6baf5f87ca5505ea8caa01d497453bceb9ccd69d
parentc123096cf14ac87875bba51279e46cceeb18faa1
libstdc++: Fix -Wunused-variable warning for -fno-exceptions build

If _GLIBCXX_THROW_OR_ABORT expands to just __builtin_abort() then the
bool variable used in the filesystem_error constructor is unused. Mark
it as maybe_unused to there's no warning for -fno-exceptions builds.

libstdc++-v3/ChangeLog:

* src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
Add [[maybe_unused]] attribute.
* src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
Likewise.
libstdc++-v3/src/c++17/fs_dir.cc
libstdc++-v3/src/filesystem/dir.cc