Fix unused function error
[deliverable/binutils-gdb.git] / gdb / gdbsupport / safe-strerror.c
index 9973fa678577c3ff1d9188a6679a0c8cecfd5d26..a5ddf74835336cd35b685e751bcede02a64b6a46 100644 (file)
@@ -18,7 +18,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "common-defs.h"
-#include "diagnostics.h"
 #include <string.h>
 
 /* There are two different versions of strerror_r; one is GNU-specific, the
    to solve this for us because IPA does not use Gnulib but uses this
    function.  */
 
-/* We only ever use one of the two overloads, so suppress the warning for
-   an unused function.  */
-DIAGNOSTIC_PUSH
-DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
-
 /* Called if we have a XSI-compliant strerror_r.  */
-static char *
+ATTRIBUTE_UNUSED static char *
 select_strerror_r (int res, char *buf)
 {
   return res == 0 ? buf : nullptr;
 }
 
 /* Called if we have a GNU strerror_r.  */
-static char *
+ATTRIBUTE_UNUSED static char *
 select_strerror_r (char *res, char *)
 {
   return res;
 }
 
-DIAGNOSTIC_POP
-
 /* Implementation of safe_strerror as defined in common-utils.h.  */
 
 const char *
This page took 0.023904 seconds and 4 git commands to generate.