aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-07-23 10:08:52 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2024-07-23 10:25:36 +0100
commitb40156d69153364315e071dc968227ce1c3bd2a8 (patch)
tree4c79115c4161a0688ded8e8be12c82885d7fdc95
parent8439405e38c56b774cf3c65bdafae5f9e11d470a (diff)
downloadgcc-b40156d69153364315e071dc968227ce1c3bd2a8.zip
gcc-b40156d69153364315e071dc968227ce1c3bd2a8.tar.gz
gcc-b40156d69153364315e071dc968227ce1c3bd2a8.tar.bz2
libstdc++: Use [[maybe_unused]] attribute in src/c++23/print.cc
This avoids some warnings when the preprocessor conditions are not met. libstdc++-v3/ChangeLog: * src/c++23/print.cc (__open_terminal): Use [[maybe_unused]] on parameter.
-rw-r--r--libstdc++-v3/src/c++23/print.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/src/c++23/print.cc b/libstdc++-v3/src/c++23/print.cc
index 558dc149..8ba7140 100644
--- a/libstdc++-v3/src/c++23/print.cc
+++ b/libstdc++-v3/src/c++23/print.cc
@@ -67,7 +67,7 @@ namespace
// This returns intptr_t that is either a Windows HANDLE
// or 1 + a POSIX file descriptor. A zero return indicates failure.
void*
- __open_terminal(FILE* f)
+ __open_terminal([[maybe_unused]] FILE* f)
{
#ifndef _GLIBCXX_USE_STDIO_PURE
if (f)
@@ -85,7 +85,7 @@ namespace
}
void*
- __open_terminal(std::streambuf* sb)
+ __open_terminal([[maybe_unused]] std::streambuf* sb)
{
#if ! defined _GLIBCXX_USE_STDIO_PURE && defined __cpp_rtti
using namespace __gnu_cxx;