summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-09-22 09:41:13 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-09-22 09:41:13 -0500
commit49fb4dcb52f4b7a124819f287e4e075d486dd9e1 (patch)
tree0dbe97c86e266db08ace0f43a7a34e7c786c2d14
parentbasedefs.h: Add RTEMS_COMPILER_UNUSED_ATTRIBUTE. (diff)
downloadrtems-49fb4dcb52f4b7a124819f287e4e075d486dd9e1.tar.bz2
mqueueopen.c: Switch to using RTEMS_COMPILER_UNUSED_ATTRIBUTE
-rw-r--r--cpukit/posix/src/mqueueopen.c19
1 files 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