From f07b0e6563430b38f6d362a6b21011190e331562 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 22 Sep 2013 09:41:49 -0500 Subject: sparc/.../grcan.c: Switch to using RTEMS_COMPILER_UNUSED_ATTRIBUTE --- c/src/lib/libbsp/sparc/shared/can/grcan.c | 14 ++++++-------- 1 file 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) { -- cgit v1.2.3