mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-29 13:29:23 +08:00
mqueueopen.c: Switch to using RTEMS_COMPILER_UNUSED_ATTRIBUTE
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user