diff options
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/can/grcan.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/can/grcan.c b/c/src/lib/libbsp/sparc/shared/can/grcan.c index e7e0ca06ad..9d86bc4e9a 100644 --- a/c/src/lib/libbsp/sparc/shared/can/grcan.c +++ b/c/src/lib/libbsp/sparc/shared/can/grcan.c @@ -299,15 +299,14 @@ static void __inline__ grcan_hw_reset(struct grcan_regs *regs) regs->ctrl = GRCAN_CTRL_RESET; } -/* - * tmp is set but never used. GCC gives a warning for this - * and we need to tell GCC not to complain. - */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" static rtems_device_driver grcan_start(struct grcan_priv *pDev) { - unsigned int tmp; + /* + * tmp is set but never used. GCC gives a warning for this + * and we need to tell GCC not to complain. + */ + unsigned int tmp RTEMS_COMPILER_UNUSED_ATTRIBUTE; + IRQ_GLOBAL_PREPARE(oldLevel); FUNCDBG(); @@ -374,7 +373,6 @@ static rtems_device_driver grcan_start(struct grcan_priv *pDev) */ return RTEMS_SUCCESSFUL; } -#pragma GCC diagnostic pop static void grcan_stop(struct grcan_priv *pDev) { |