mqueueopen.c: Switch to using RTEMS_COMPILER_UNUSED_ATTRIBUTE

This commit is contained in:
Joel Sherrill
2013-09-22 09:41:13 -05:00
parent ecd82b6def
commit 49fb4dcb52
+8 -11
View File
@@ -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