projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix unused function error
[deliverable/binutils-gdb.git]
/
gdb
/
gdbsupport
/
safe-strerror.c
diff --git
a/gdb/gdbsupport/safe-strerror.c
b/gdb/gdbsupport/safe-strerror.c
index 9973fa678577c3ff1d9188a6679a0c8cecfd5d26..a5ddf74835336cd35b685e751bcede02a64b6a46 100644
(file)
--- a/
gdb/gdbsupport/safe-strerror.c
+++ b/
gdb/gdbsupport/safe-strerror.c
@@
-18,7
+18,6
@@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "common-defs.h"
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
#include <string.h>
/* There are two different versions of strerror_r; one is GNU-specific, the
@@
-27,27
+26,20
@@
to solve this for us because IPA does not use Gnulib but uses this
function. */
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. */
/* 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. */
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;
}
select_strerror_r (char *res, char *)
{
return res;
}
-DIAGNOSTIC_POP
-
/* Implementation of safe_strerror as defined in common-utils.h. */
const char *
/* Implementation of safe_strerror as defined in common-utils.h. */
const char *
This page took
0.024597 seconds
and
4
git commands to generate.