[committed] libstdc++: Fix unused warning for new variable
Checks
Commit Message
Tested powerpc64le-linux and x86_64-linux. Pushed to trunk.
-- >8 --
This newly-introduced variable isn't used on all paths, so add the
[[maybe_unused]] attribute.
libstdc++-v3/ChangeLog:
* src/c++11/random.cc (random_device::_M_init): Add maybe_unused
attribute.
---
libstdc++-v3/src/c++11/random.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -374,11 +374,11 @@ namespace std _GLIBCXX_VISIBILITY(default)
" unsupported token"));
#if defined ENOSYS
- const int unsupported = ENOSYS;
+ [[maybe_unused]] const int unsupported = ENOSYS;
#elif defined ENOTSUP
- const int unsupported = ENOTSUP;
+ [[maybe_unused]] const int unsupported = ENOTSUP;
#else
- const int unsupported = 0;
+ [[maybe_unused]] const int unsupported = 0;
#endif
int err = 0;