libstdc++: Fix unused warning for new variable

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.
This commit is contained in:
Jonathan Wakely 2023-06-30 15:13:25 +01:00
parent eab57b825b
commit d083c8c808
1 changed files with 3 additions and 3 deletions

View File

@ -374,11 +374,11 @@ namespace std _GLIBCXX_VISIBILITY(default)
" unsupported token")); " unsupported token"));
#if defined ENOSYS #if defined ENOSYS
const int unsupported = ENOSYS; [[maybe_unused]] const int unsupported = ENOSYS;
#elif defined ENOTSUP #elif defined ENOTSUP
const int unsupported = ENOTSUP; [[maybe_unused]] const int unsupported = ENOTSUP;
#else #else
const int unsupported = 0; [[maybe_unused]] const int unsupported = 0;
#endif #endif
int err = 0; int err = 0;