From 49fb4dcb52f4b7a124819f287e4e075d486dd9e1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 22 Sep 2013 09:41:13 -0500 Subject: mqueueopen.c: Switch to using RTEMS_COMPILER_UNUSED_ATTRIBUTE --- cpukit/posix/src/mqueueopen.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/cpukit/posix/src/mqueueopen.c b/cpukit/posix/src/mqueueopen.c index a4bd28d0bd..f5132ac974 100644 --- a/cpukit/posix/src/mqueueopen.c +++ b/cpukit/posix/src/mqueueopen.c @@ -47,15 +47,6 @@ /* * 15.2.2 Open a Message Queue, P1003.1b-1993, p. 272 */ - -/* - * mode is set but never used. GCC gives a warning for this - * and we need to tell GCC not to complain. But we have to - * have it because we have to work through the variable - * arguments to get to attr. - */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" mqd_t mq_open( const char *name, int oflag, @@ -64,8 +55,15 @@ mqd_t mq_open( /* struct mq_attr attr */ ) { + /* + * mode is set but never used. GCC gives a warning for this + * and we need to tell GCC not to complain. But we have to + * have it because we have to work through the variable + * arguments to get to attr. + */ + mode_t mode RTEMS_COMPILER_UNUSED_ATTRIBUTE; + va_list arg; - mode_t mode; struct mq_attr *attr = NULL; int status; Objects_Id the_mq_id; @@ -169,4 +167,3 @@ mqd_t mq_open( return (mqd_t) the_mq_fd->Object.id; } -#pragma GCC diagnostic pop -- cgit v1.2.3