[rtems commit] mqueueopen.c: Address set but unused variable warning
Joel Sherrill
joel at rtems.org
Sat Sep 21 21:19:52 UTC 2013
Module: rtems
Branch: master
Commit: 41ea8015d24d4858442afe416c8f2b41fea9413d
Changeset: http://git.rtems.org/rtems/commit/?id=41ea8015d24d4858442afe416c8f2b41fea9413d
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Sat Sep 21 16:13:25 2013 -0500
mqueueopen.c: Address set but unused variable warning
---
cpukit/posix/src/mqueueopen.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/cpukit/posix/src/mqueueopen.c b/cpukit/posix/src/mqueueopen.c
index 2a3991d..a4bd28d 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
More information about the vc
mailing list