From 41ea8015d24d4858442afe416c8f2b41fea9413d Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 21 Sep 2013 16:13:25 -0500 Subject: mqueueopen.c: Address set but unused variable warning --- cpukit/posix/src/mqueueopen.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.3