summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-09-21 16:13:25 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-09-21 16:13:25 -0500
commit41ea8015d24d4858442afe416c8f2b41fea9413d (patch)
tree24aa52d8b1f32aeb9cd6832ef04870587b3a5682
parentsparc/.../grcan.c: Fix multiple warnings (diff)
downloadrtems-41ea8015d24d4858442afe416c8f2b41fea9413d.tar.bz2
mqueueopen.c: Address set but unused variable warning
-rw-r--r--cpukit/posix/src/mqueueopen.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpukit/posix/src/mqueueopen.c b/cpukit/posix/src/mqueueopen.c
index 2a3991dd55..a4bd28d0bd 100644
--- a/cpukit/posix/src/mqueueopen.c
+++ b/cpukit/posix/src/mqueueopen.c
@@ -47,6 +47,15 @@
/*
* 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,
@@ -160,3 +169,4 @@ mqd_t mq_open(
return (mqd_t) the_mq_fd->Object.id;
}
+#pragma GCC diagnostic pop