[PATCH 5/6] basdefs.h: Add and use RTEMS_UNUSED

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Oct 16 06:59:34 UTC 2015


---
 .../libbsp/arm/shared/lpc/network/lpc-ethernet.c   |  6 ++--
 c/src/lib/libbsp/i386/pc386/console/fb_cirrus.c    |  2 +-
 c/src/lib/libbsp/i386/shared/comm/uart.c           |  2 +-
 .../libbsp/powerpc/beatnik/network/if_em/if_em.c   |  2 +-
 .../lib/libbsp/powerpc/virtex4/startup/bspstart.c  |  4 +--
 .../lib/libbsp/powerpc/virtex5/startup/bspstart.c  |  4 +--
 c/src/lib/libbsp/sparc/shared/can/grcan.c          |  2 +-
 cpukit/ftpd/ftpd.c                                 |  2 +-
 cpukit/libblock/src/bdpart-mount.c                 |  4 +--
 cpukit/libblock/src/bdpart-register.c              |  2 +-
 cpukit/libblock/src/blkdev.c                       | 16 +++++------
 cpukit/libblock/src/flashdisk.c                    |  2 +-
 cpukit/libblock/src/media-server.c                 |  2 +-
 cpukit/libblock/src/media.c                        | 10 +++----
 cpukit/libblock/src/nvdisk-sram.c                  | 12 ++++----
 cpukit/libblock/src/nvdisk.c                       |  2 +-
 cpukit/libblock/src/ramdisk-config.c               |  4 +--
 cpukit/libcsupport/src/__gettod.c                  |  4 +--
 cpukit/libcsupport/src/__times.c                   |  2 +-
 cpukit/libcsupport/src/_calloc_r.c                 |  3 +-
 cpukit/libcsupport/src/_free_r.c                   |  3 +-
 cpukit/libcsupport/src/_malloc_r.c                 |  3 +-
 cpukit/libcsupport/src/_realloc_r.c                |  3 +-
 cpukit/libcsupport/src/_rename_r.c                 |  2 +-
 cpukit/libcsupport/src/assocnamebad.c              |  2 +-
 cpukit/libcsupport/src/close.c                     |  2 +-
 cpukit/libcsupport/src/envlock.c                   |  4 +--
 cpukit/libcsupport/src/fcntl.c                     |  2 +-
 cpukit/libcsupport/src/flockfile.c                 |  3 +-
 cpukit/libcsupport/src/fstat.c                     |  2 +-
 cpukit/libcsupport/src/ftrylockfile.c              |  3 +-
 cpukit/libcsupport/src/funlockfile.c               |  3 +-
 cpukit/libcsupport/src/getpid.c                    |  2 +-
 cpukit/libcsupport/src/isatty_r.c                  |  3 +-
 cpukit/libcsupport/src/link.c                      |  2 +-
 cpukit/libcsupport/src/lseek.c                     |  2 +-
 cpukit/libcsupport/src/newlibc_reent.c             |  2 +-
 cpukit/libcsupport/src/open.c                      |  2 +-
 cpukit/libcsupport/src/printk_plugin.c             |  4 ++-
 cpukit/libcsupport/src/read.c                      |  2 +-
 cpukit/libcsupport/src/rtems_heap_null_extend.c    |  4 +--
 cpukit/libcsupport/src/setpgid.c                   |  6 ++--
 cpukit/libcsupport/src/stat.c                      |  4 +--
 cpukit/libcsupport/src/tcflow.c                    |  4 ++-
 cpukit/libcsupport/src/tcgetpgrp.c                 |  3 +-
 cpukit/libcsupport/src/tcsendbreak.c               |  4 +--
 cpukit/libcsupport/src/tcsetpgrp.c                 |  4 +--
 cpukit/libcsupport/src/unlink.c                    |  2 +-
 cpukit/libcsupport/src/write_r.c                   |  2 +-
 cpukit/libfs/src/nfsclient/src/dirutils.c          |  2 +-
 cpukit/libmisc/capture/capture-cli.c               |  2 +-
 cpukit/libmisc/capture/capture.c                   |  2 +-
 cpukit/libmisc/devnull/devnull.c                   | 32 +++++++++++-----------
 cpukit/libmisc/devnull/devzero.c                   | 32 +++++++++++-----------
 cpukit/libmisc/fb/mw_uid.c                         |  2 +-
 cpukit/libmisc/monitor/mon-command.c               |  2 +-
 cpukit/libmisc/monitor/mon-config.c                |  8 +++---
 cpukit/libmisc/monitor/mon-driver.c                |  4 +--
 cpukit/libmisc/monitor/mon-extension.c             |  2 +-
 cpukit/libmisc/monitor/mon-itask.c                 |  4 +--
 cpukit/libmisc/monitor/mon-monitor.c               | 26 +++++++++---------
 cpukit/libmisc/monitor/mon-network.c               |  8 +++---
 cpukit/libmisc/monitor/mon-part.c                  |  4 +--
 cpukit/libmisc/monitor/mon-queue.c                 |  4 +--
 cpukit/libmisc/monitor/mon-region.c                |  4 +--
 cpukit/libmisc/monitor/mon-sema.c                  |  4 +--
 cpukit/libmisc/monitor/mon-server.c                |  4 +--
 cpukit/libmisc/monitor/mon-symbols.c               |  4 +--
 cpukit/libmisc/monitor/mon-task.c                  |  4 +--
 cpukit/libmisc/serdbg/termios_printk.c             |  2 +-
 cpukit/libmisc/shell/cmds.c                        |  2 +-
 cpukit/libmisc/shell/err.h                         |  1 +
 cpukit/libmisc/shell/extern-cp.h                   |  1 +
 cpukit/libmisc/shell/extern-ls.h                   |  1 +
 cpukit/libmisc/shell/hexdump-odsyntax.c            |  2 +-
 cpukit/libmisc/shell/main_dd.c                     |  2 +-
 cpukit/libmisc/shell/main_halt.c                   |  4 +--
 cpukit/libmisc/shell/main_id.c                     |  4 +--
 cpukit/libmisc/shell/main_logoff.c                 |  4 +--
 cpukit/libmisc/shell/main_mount_nfs.c              |  4 +--
 cpukit/libmisc/shell/main_pwd.c                    |  4 +--
 cpukit/libmisc/shell/main_stackuse.c               |  4 +--
 cpukit/libmisc/shell/main_tty.c                    |  4 +--
 cpukit/libmisc/shell/main_whoami.c                 |  4 +--
 cpukit/libmisc/shell/main_wkspaceinfo.c            |  4 +--
 cpukit/libmisc/shell/shell_script.c                |  2 +-
 cpukit/libmisc/shell/utils-cp.c                    |  6 ++--
 cpukit/libmisc/shell/utils-ls.c                    |  2 +-
 cpukit/libmisc/shell/verr.c                        |  2 +-
 cpukit/libmisc/shell/verrx.c                       |  2 +-
 cpukit/libmisc/stackchk/check.c                    |  6 ++--
 cpukit/libnetworking/lib/tftpDriver.c              |  4 +--
 cpukit/posix/src/_execve.c                         |  9 ++++--
 cpukit/posix/src/aio_suspend.c                     |  6 ++--
 cpukit/posix/src/alarm.c                           |  4 +--
 cpukit/posix/src/lio_listio.c                      |  8 +++---
 cpukit/posix/src/mmap.c                            | 16 +++++++----
 cpukit/posix/src/mprotect.c                        | 10 +++++--
 cpukit/posix/src/mqueueopen.c                      |  2 +-
 cpukit/posix/src/munmap.c                          |  6 ++--
 cpukit/posix/src/psignal.c                         |  2 +-
 cpukit/posix/src/pthread.c                         |  4 +--
 cpukit/posix/src/pthreadatfork.c                   |  9 ++++--
 cpukit/posix/src/sched_getparam.c                  |  4 +--
 cpukit/posix/src/sched_getscheduler.c              |  2 +-
 cpukit/posix/src/sched_setparam.c                  |  4 +--
 cpukit/posix/src/sched_setscheduler.c              |  6 ++--
 cpukit/posix/src/semopen.c                         |  2 +-
 cpukit/posix/src/timertsr.c                        |  2 +-
 cpukit/posix/src/ualarm.c                          |  4 +--
 cpukit/score/include/rtems/score/basedefs.h        |  7 +++--
 cpukit/score/include/rtems/score/objectimpl.h      |  2 +-
 cpukit/score/include/rtems/score/sysstate.h        |  2 +-
 cpukit/score/src/corebarrierrelease.c              |  4 +--
 cpukit/score/src/coremsgbroadcast.c                |  4 +--
 cpukit/score/src/coremsgsubmit.c                   |  2 +-
 cpukit/score/src/coremutexsurrender.c              |  4 +--
 cpukit/score/src/heapextend.c                      |  2 +-
 cpukit/score/src/heapgetinfo.c                     |  2 +-
 cpukit/score/src/heapnoextend.c                    |  8 +++---
 cpukit/score/src/threadqflush.c                    |  2 +-
 testsuites/libtests/devfs04/test_driver.c          | 30 ++++++++++----------
 testsuites/libtests/deviceio01/test_driver.c       | 30 ++++++++++----------
 testsuites/psxtests/psxconfig01/init.c             |  6 ++--
 testsuites/sptests/spfatal_support/consume_sems.c  | 12 ++++----
 testsuites/sptests/spfatal_support/system.h        |  6 ++--
 testsuites/tmtests/tmoverhd/dumrtems.h             |  2 +-
 127 files changed, 330 insertions(+), 291 deletions(-)

diff --git a/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c b/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
index f1d019e..170de7f 100644
--- a/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
+++ b/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
@@ -1127,7 +1127,7 @@ static uint32_t lpc_eth_mdio_read_anlpar(int phy)
 
 static int lpc_eth_mdio_read(
   int phy,
-  void *arg __attribute__((unused)),
+  void *arg RTEMS_UNUSED,
   unsigned reg,
   uint32_t *val
 )
@@ -1152,7 +1152,7 @@ static int lpc_eth_mdio_read(
 
 static int lpc_eth_mdio_write(
   int phy,
-  void *arg __attribute__((unused)),
+  void *arg RTEMS_UNUSED,
   unsigned reg,
   uint32_t val
 )
@@ -1811,7 +1811,7 @@ cleanup:
 }
 
 static int lpc_eth_detach(
-  struct rtems_bsdnet_ifconfig *config __attribute__((unused))
+  struct rtems_bsdnet_ifconfig *config RTEMS_UNUSED
 )
 {
   /* FIXME: Detach the interface from the upper layers? */
diff --git a/c/src/lib/libbsp/i386/pc386/console/fb_cirrus.c b/c/src/lib/libbsp/i386/pc386/console/fb_cirrus.c
index 15d36a3..bb05b5a 100644
--- a/c/src/lib/libbsp/i386/pc386/console/fb_cirrus.c
+++ b/c/src/lib/libbsp/i386/pc386/console/fb_cirrus.c
@@ -277,7 +277,7 @@ fb_cirrus_write_hdr_reg (
     const struct cirrus_board_str *fbst,
     unsigned int val)
 {
-  volatile unsigned int dummy __attribute__((unused));
+  volatile unsigned int dummy RTEMS_UNUSED;
   dummy = fb_cirrus_read_reg8(fbst, VGA_DAC_MASK);
   dummy = fb_cirrus_read_reg8(fbst, VGA_DAC_MASK);
   dummy = fb_cirrus_read_reg8(fbst, VGA_DAC_MASK);
diff --git a/c/src/lib/libbsp/i386/shared/comm/uart.c b/c/src/lib/libbsp/i386/shared/comm/uart.c
index 58421f4..fd64eb2 100644
--- a/c/src/lib/libbsp/i386/shared/comm/uart.c
+++ b/c/src/lib/libbsp/i386/shared/comm/uart.c
@@ -802,7 +802,7 @@ BSP_uart_termios_isr_com2(void *ignored)
 }
 
 /* ================= GDB support     ===================*/
-int BSP_uart_dbgisr_com_regsav[4] __attribute__ ((unused));
+int BSP_uart_dbgisr_com_regsav[4] RTEMS_UNUSED;
 
 /*
  * Interrupt service routine for COM1 - all,
diff --git a/c/src/lib/libbsp/powerpc/beatnik/network/if_em/if_em.c b/c/src/lib/libbsp/powerpc/beatnik/network/if_em/if_em.c
index dc3bc93..98f1453 100644
--- a/c/src/lib/libbsp/powerpc/beatnik/network/if_em/if_em.c
+++ b/c/src/lib/libbsp/powerpc/beatnik/network/if_em/if_em.c
@@ -761,7 +761,7 @@ em_start_locked(struct ifnet *ifp)
 static void
 em_start(struct ifnet *ifp)
 {
-	struct adapter *adapter __attribute__((unused)) = ifp->if_softc;
+	struct adapter *adapter RTEMS_UNUSED = ifp->if_softc;
 
 	EM_LOCK(adapter);
 	em_start_locked(ifp);
diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c
index 90dafd2..5a2d88d 100644
--- a/c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c
@@ -137,7 +137,7 @@ void BSP_ask_for_reset(void)
 
 void BSP_panic(char *s)
 {
-  __attribute__((unused)) rtems_interrupt_level level;
+  RTEMS_UNUSED rtems_interrupt_level level;
 
   rtems_interrupt_disable(level);
 
@@ -149,7 +149,7 @@ void BSP_panic(char *s)
 
 void _BSP_Fatal_error(unsigned int v)
 {
-  __attribute__((unused)) rtems_interrupt_level level;
+  RTEMS_UNUSED rtems_interrupt_level level;
 
   rtems_interrupt_disable(level);
 
diff --git a/c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c
index 7db41bd..211e5b1 100644
--- a/c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c
@@ -151,7 +151,7 @@ void BSP_ask_for_reset(void)
 
 void BSP_panic(char *s)
 {
-  __attribute__((unused)) rtems_interrupt_level level;
+  RTEMS_UNUSED rtems_interrupt_level level;
 
   rtems_interrupt_disable(level);
 
@@ -163,7 +163,7 @@ void BSP_panic(char *s)
 
 void _BSP_Fatal_error(unsigned int v)
 {
-  __attribute__((unused)) rtems_interrupt_level level;
+  RTEMS_UNUSED rtems_interrupt_level level;
 
   rtems_interrupt_disable(level);
 
diff --git a/c/src/lib/libbsp/sparc/shared/can/grcan.c b/c/src/lib/libbsp/sparc/shared/can/grcan.c
index c1d1271..46599dc 100644
--- a/c/src/lib/libbsp/sparc/shared/can/grcan.c
+++ b/c/src/lib/libbsp/sparc/shared/can/grcan.c
@@ -434,7 +434,7 @@ static rtems_device_driver grcan_start(struct grcan_priv *pDev)
    * 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;
+  unsigned int tmp RTEMS_UNUSED;
 
   IRQ_GLOBAL_PREPARE(oldLevel);
 
diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c
index 0a89bbd..94b8ee0 100644
--- a/cpukit/ftpd/ftpd.c
+++ b/cpukit/ftpd/ftpd.c
@@ -1990,7 +1990,7 @@ session(rtems_task_argument arg)
  *   NONE
  */
 static void
-daemon(rtems_task_argument args __attribute__((unused)))
+daemon(rtems_task_argument args RTEMS_UNUSED)
 {
   int                 s;
   socklen_t	      addrLen;
diff --git a/cpukit/libblock/src/bdpart-mount.c b/cpukit/libblock/src/bdpart-mount.c
index fe069f5..6cb2817 100644
--- a/cpukit/libblock/src/bdpart-mount.c
+++ b/cpukit/libblock/src/bdpart-mount.c
@@ -32,7 +32,7 @@
 
 rtems_status_code rtems_bdpart_mount(
   const char *disk_name,
-  const rtems_bdpart_partition *pt __attribute__((unused)),
+  const rtems_bdpart_partition *pt RTEMS_UNUSED,
   size_t count,
   const char *mount_base
 )
@@ -118,7 +118,7 @@ cleanup:
 
 rtems_status_code rtems_bdpart_unmount(
   const char *disk_name,
-  const rtems_bdpart_partition *pt __attribute__((unused)),
+  const rtems_bdpart_partition *pt RTEMS_UNUSED,
   size_t count,
   const char *mount_base
 )
diff --git a/cpukit/libblock/src/bdpart-register.c b/cpukit/libblock/src/bdpart-register.c
index b52111e..30957aa 100644
--- a/cpukit/libblock/src/bdpart-register.c
+++ b/cpukit/libblock/src/bdpart-register.c
@@ -142,7 +142,7 @@ rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
 
 rtems_status_code rtems_bdpart_unregister(
   const char *disk_name,
-  const rtems_bdpart_partition *pt __attribute__((unused)),
+  const rtems_bdpart_partition *pt RTEMS_UNUSED,
   size_t count
 )
 {
diff --git a/cpukit/libblock/src/blkdev.c b/cpukit/libblock/src/blkdev.c
index c946d33..0d1d910 100644
--- a/cpukit/libblock/src/blkdev.c
+++ b/cpukit/libblock/src/blkdev.c
@@ -30,8 +30,8 @@
  */
 rtems_device_driver
 rtems_blkdev_generic_read(
-    rtems_device_major_number major __attribute__((unused)),
-    rtems_device_minor_number minor __attribute__((unused)),
+    rtems_device_major_number major RTEMS_UNUSED,
+    rtems_device_minor_number minor RTEMS_UNUSED,
     void                    * arg)
 {
     rtems_status_code rc = RTEMS_SUCCESSFUL;
@@ -77,8 +77,8 @@ rtems_blkdev_generic_read(
  */
 rtems_device_driver
 rtems_blkdev_generic_write(
-    rtems_device_major_number major __attribute__((unused)),
-    rtems_device_minor_number minor __attribute__((unused)),
+    rtems_device_major_number major RTEMS_UNUSED,
+    rtems_device_minor_number minor RTEMS_UNUSED,
     void                    * arg)
 {
     rtems_status_code rc = RTEMS_SUCCESSFUL;
@@ -152,8 +152,8 @@ rtems_blkdev_generic_open(
  */
 rtems_device_driver
 rtems_blkdev_generic_close(
-    rtems_device_major_number major __attribute__((unused)),
-    rtems_device_minor_number minor __attribute__((unused)),
+    rtems_device_major_number major RTEMS_UNUSED,
+    rtems_device_minor_number minor RTEMS_UNUSED,
     void                    * arg)
 {
   rtems_libio_open_close_args_t *oc = arg;
@@ -170,8 +170,8 @@ rtems_blkdev_generic_close(
  */
 rtems_device_driver
 rtems_blkdev_generic_ioctl(
-    rtems_device_major_number major __attribute__((unused)),
-    rtems_device_minor_number minor __attribute__((unused)),
+    rtems_device_major_number major RTEMS_UNUSED,
+    rtems_device_minor_number minor RTEMS_UNUSED,
     void                    * arg)
 {
     rtems_libio_ioctl_args_t *args = arg;
diff --git a/cpukit/libblock/src/flashdisk.c b/cpukit/libblock/src/flashdisk.c
index b394892..1761178 100644
--- a/cpukit/libblock/src/flashdisk.c
+++ b/cpukit/libblock/src/flashdisk.c
@@ -2463,7 +2463,7 @@ rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
 rtems_device_driver
 rtems_fdisk_initialize (rtems_device_major_number major,
                         rtems_device_minor_number minor,
-                        void*                     arg __attribute__((unused)))
+                        void*                     arg RTEMS_UNUSED)
 {
   const rtems_flashdisk_config* c = rtems_flashdisk_configuration;
   rtems_flashdisk*              fd;
diff --git a/cpukit/libblock/src/media-server.c b/cpukit/libblock/src/media-server.c
index 9fedc1c..d2ed28c 100644
--- a/cpukit/libblock/src/media-server.c
+++ b/cpukit/libblock/src/media-server.c
@@ -42,7 +42,7 @@ static RTEMS_CHAIN_DEFINE_EMPTY(message_chain);
 
 static rtems_id server_id = RTEMS_ID_NONE;
 
-static void media_server(rtems_task_argument arg __attribute__((unused)))
+static void media_server(rtems_task_argument arg RTEMS_UNUSED)
 {
   rtems_status_code sc = RTEMS_SUCCESSFUL;
 
diff --git a/cpukit/libblock/src/media.c b/cpukit/libblock/src/media.c
index 8953b79..d1679c8 100644
--- a/cpukit/libblock/src/media.c
+++ b/cpukit/libblock/src/media.c
@@ -646,7 +646,7 @@ static rtems_status_code attach_and_mount_partitions(
 static rtems_status_code partition_inquiry_worker(
   rtems_media_state state,
   const char *src,
-  char **dest __attribute__((unused)),
+  char **dest RTEMS_UNUSED,
   void *worker_arg
 )
 {
@@ -749,8 +749,8 @@ static rtems_status_code do_disk_attach(
 static rtems_status_code unmount_worker(
   rtems_media_state state,
   const char *src,
-  char **dest __attribute__((unused)),
-  void *worker_arg __attribute__((unused))
+  char **dest RTEMS_UNUSED,
+  void *worker_arg RTEMS_UNUSED
 )
 {
   rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -795,8 +795,8 @@ static rtems_status_code do_unmount(
 static rtems_status_code disk_detach_worker(
   rtems_media_state state,
   const char *src,
-  char **dest __attribute__((unused)),
-  void *worker_arg __attribute__((unused))
+  char **dest RTEMS_UNUSED,
+  void *worker_arg RTEMS_UNUSED
 )
 {
   rtems_status_code rsc = RTEMS_SUCCESSFUL;
diff --git a/cpukit/libblock/src/nvdisk-sram.c b/cpukit/libblock/src/nvdisk-sram.c
index 322c388..71ef5ef 100644
--- a/cpukit/libblock/src/nvdisk-sram.c
+++ b/cpukit/libblock/src/nvdisk-sram.c
@@ -28,8 +28,8 @@
 #endif
 
 static int
-rtems_nvdisk_sram_read (uint32_t device __attribute__((unused)),
-                        uint32_t flags __attribute__((unused)),
+rtems_nvdisk_sram_read (uint32_t device RTEMS_UNUSED,
+                        uint32_t flags RTEMS_UNUSED,
                         void*    base,
                         uint32_t offset,
                         void*    buffer,
@@ -40,8 +40,8 @@ rtems_nvdisk_sram_read (uint32_t device __attribute__((unused)),
 }
 
 static int
-rtems_nvdisk_sram_write (uint32_t    device __attribute__((unused)),
-                         uint32_t    flags __attribute__((unused)),
+rtems_nvdisk_sram_write (uint32_t    device RTEMS_UNUSED,
+                         uint32_t    flags RTEMS_UNUSED,
                          void*       base,
                          uint32_t    offset,
                          const void* buffer,
@@ -52,8 +52,8 @@ rtems_nvdisk_sram_write (uint32_t    device __attribute__((unused)),
 }
 
 static int
-rtems_nvdisk_sram_verify (uint32_t    device __attribute__((unused)),
-                          uint32_t    flags __attribute__((unused)),
+rtems_nvdisk_sram_verify (uint32_t    device RTEMS_UNUSED,
+                          uint32_t    flags RTEMS_UNUSED,
                           void*       base,
                           uint32_t    offset,
                           const void* buffer,
diff --git a/cpukit/libblock/src/nvdisk.c b/cpukit/libblock/src/nvdisk.c
index fa60cbd..1df0ca2 100644
--- a/cpukit/libblock/src/nvdisk.c
+++ b/cpukit/libblock/src/nvdisk.c
@@ -764,7 +764,7 @@ rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
 rtems_device_driver
 rtems_nvdisk_initialize (rtems_device_major_number major,
                         rtems_device_minor_number minor,
-                        void*                     arg __attribute__((unused)))
+                        void*                     arg RTEMS_UNUSED)
 {
   const rtems_nvdisk_config* c = rtems_nvdisk_configuration;
   rtems_nvdisk*              nvd;
diff --git a/cpukit/libblock/src/ramdisk-config.c b/cpukit/libblock/src/ramdisk-config.c
index 76006fb..7bd137a 100644
--- a/cpukit/libblock/src/ramdisk-config.c
+++ b/cpukit/libblock/src/ramdisk-config.c
@@ -24,8 +24,8 @@
 rtems_device_driver
 ramdisk_initialize(
     rtems_device_major_number major,
-    rtems_device_minor_number minor __attribute__((unused)),
-    void *arg __attribute__((unused)))
+    rtems_device_minor_number minor RTEMS_UNUSED,
+    void *arg RTEMS_UNUSED)
 {
     rtems_device_minor_number i;
     rtems_ramdisk_config *c = rtems_ramdisk_configuration;
diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c
index b0b60de..578369b 100644
--- a/cpukit/libcsupport/src/__gettod.c
+++ b/cpukit/libcsupport/src/__gettod.c
@@ -39,7 +39,7 @@
  */
 int gettimeofday(
   struct timeval *__restrict tp,
-  void *__restrict __tz __attribute__((unused))
+  void *__restrict __tz RTEMS_UNUSED
 )
 {
   /* struct timezone* tzp = (struct timezone*) __tz; */
@@ -70,7 +70,7 @@ int gettimeofday(
  *  "Reentrant" version
  */
 int _gettimeofday_r(
-  struct _reent   *ignored_reentrancy_stuff __attribute__((unused)),
+  struct _reent   *ignored_reentrancy_stuff RTEMS_UNUSED,
   struct timeval  *tp,
   void           *__tz
 )
diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c
index e5ec411..ea6d1c6 100644
--- a/cpukit/libcsupport/src/__times.c
+++ b/cpukit/libcsupport/src/__times.c
@@ -115,7 +115,7 @@ clock_t times(
  *  This is the Newlib dependent reentrant version of times().
  */
 clock_t _times_r(
-   struct _reent *ptr __attribute__((unused)),
+   struct _reent *ptr RTEMS_UNUSED,
    struct tms  *ptms
 )
 {
diff --git a/cpukit/libcsupport/src/_calloc_r.c b/cpukit/libcsupport/src/_calloc_r.c
index 11dd49b..58e6a5c 100644
--- a/cpukit/libcsupport/src/_calloc_r.c
+++ b/cpukit/libcsupport/src/_calloc_r.c
@@ -23,11 +23,12 @@
 #include <stdlib.h>
 
 void *_calloc_r(
-  struct _reent *ignored __attribute__((unused)),
+  struct _reent *ignored,
   size_t         elements,
   size_t         size
 )
 {
+  (void) ignored;
   return calloc( elements, size );
 }
 #endif
diff --git a/cpukit/libcsupport/src/_free_r.c b/cpukit/libcsupport/src/_free_r.c
index b8a654e..3bd6025 100644
--- a/cpukit/libcsupport/src/_free_r.c
+++ b/cpukit/libcsupport/src/_free_r.c
@@ -23,10 +23,11 @@
 #include <stdlib.h>
 
 void _free_r(
-  struct _reent *ignored __attribute__((unused)),
+  struct _reent *ignored,
   void          *ptr
 )
 {
+  (void) ignored;
   free( ptr );
 }
 #endif
diff --git a/cpukit/libcsupport/src/_malloc_r.c b/cpukit/libcsupport/src/_malloc_r.c
index 0af4100..311f6d1 100644
--- a/cpukit/libcsupport/src/_malloc_r.c
+++ b/cpukit/libcsupport/src/_malloc_r.c
@@ -18,10 +18,11 @@
 #include <stdlib.h>
 
 void *_malloc_r(
-  struct _reent *ignored __attribute__((unused)),
+  struct _reent *ignored,
   size_t         size
 )
 {
+  (void) ignored;
   return malloc( size );
 }
 #endif
diff --git a/cpukit/libcsupport/src/_realloc_r.c b/cpukit/libcsupport/src/_realloc_r.c
index 06743c5..3288080 100644
--- a/cpukit/libcsupport/src/_realloc_r.c
+++ b/cpukit/libcsupport/src/_realloc_r.c
@@ -23,11 +23,12 @@
 #include <stdlib.h>
 
 void *_realloc_r(
-  struct _reent *ignored __attribute__((unused)),
+  struct _reent *ignored,
   void          *ptr,
   size_t         size
 )
 {
+  (void) ignored;
   return realloc( ptr, size );
 }
 #endif
diff --git a/cpukit/libcsupport/src/_rename_r.c b/cpukit/libcsupport/src/_rename_r.c
index e097a5e..6f31088 100644
--- a/cpukit/libcsupport/src/_rename_r.c
+++ b/cpukit/libcsupport/src/_rename_r.c
@@ -31,7 +31,7 @@
  *  POSIX 1003.1b - 5.3.4 - Rename a file
  */
 int _rename_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   const char    *old,
   const char    *new
 )
diff --git a/cpukit/libcsupport/src/assocnamebad.c b/cpukit/libcsupport/src/assocnamebad.c
index 7977f88..3369141 100644
--- a/cpukit/libcsupport/src/assocnamebad.c
+++ b/cpukit/libcsupport/src/assocnamebad.c
@@ -22,7 +22,7 @@ rtems_assoc_name_bad(
 #ifdef RTEMS_DEBUG
     uint32_t   bad_value
 #else
-    uint32_t   bad_value __attribute((unused))
+    uint32_t   bad_value RTEMS_UNUSED
 #endif
 )
 {
diff --git a/cpukit/libcsupport/src/close.c b/cpukit/libcsupport/src/close.c
index c6d4e8f..139ffd2 100644
--- a/cpukit/libcsupport/src/close.c
+++ b/cpukit/libcsupport/src/close.c
@@ -51,7 +51,7 @@ int close(
 #include <reent.h>
 
 int _close_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   int            fd
 )
 {
diff --git a/cpukit/libcsupport/src/envlock.c b/cpukit/libcsupport/src/envlock.c
index bc6f02c..48cb2e0 100644
--- a/cpukit/libcsupport/src/envlock.c
+++ b/cpukit/libcsupport/src/envlock.c
@@ -105,13 +105,13 @@ __env_unlock(struct _reent *r)
 #include <rtems/libio_.h>
 
 void
-__env_lock(struct _reent *r __attribute__((unused)))
+__env_lock(struct _reent *r RTEMS_UNUSED)
 {
   rtems_libio_lock();
 }
 
 void
-__env_unlock(struct _reent *r __attribute__((unused)))
+__env_unlock(struct _reent *r RTEMS_UNUSED)
 {
   rtems_libio_unlock();
 }
diff --git a/cpukit/libcsupport/src/fcntl.c b/cpukit/libcsupport/src/fcntl.c
index ddaf447..e7b6b23 100644
--- a/cpukit/libcsupport/src/fcntl.c
+++ b/cpukit/libcsupport/src/fcntl.c
@@ -239,7 +239,7 @@ int fcntl(
 #include <reent.h>
 
 int _fcntl_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   int fd,
   int cmd,
   int arg
diff --git a/cpukit/libcsupport/src/flockfile.c b/cpukit/libcsupport/src/flockfile.c
index b4c28d8..511badd 100644
--- a/cpukit/libcsupport/src/flockfile.c
+++ b/cpukit/libcsupport/src/flockfile.c
@@ -23,8 +23,9 @@
 /**
  *  This is a non-functional stub 
  */
-void flockfile(FILE* file __attribute__((unused)))
+void flockfile(FILE* file)
 {
+  (void) file;
 }
 
 #endif
diff --git a/cpukit/libcsupport/src/fstat.c b/cpukit/libcsupport/src/fstat.c
index 51c8f03..8b39c43 100644
--- a/cpukit/libcsupport/src/fstat.c
+++ b/cpukit/libcsupport/src/fstat.c
@@ -60,7 +60,7 @@ int fstat(
 #include <reent.h>
 
 int _fstat_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   int            fd,
   struct stat   *buf
 )
diff --git a/cpukit/libcsupport/src/ftrylockfile.c b/cpukit/libcsupport/src/ftrylockfile.c
index 54d5419..bc567e4 100644
--- a/cpukit/libcsupport/src/ftrylockfile.c
+++ b/cpukit/libcsupport/src/ftrylockfile.c
@@ -17,8 +17,9 @@
 #include <errno.h>
 
 /* This is a non-functional stub */
-int ftrylockfile(FILE* file __attribute__((unused)))
+int ftrylockfile(FILE* file)
 {
+  (void) file;
   rtems_set_errno_and_return_minus_one( ENOTSUP );
 }
 
diff --git a/cpukit/libcsupport/src/funlockfile.c b/cpukit/libcsupport/src/funlockfile.c
index 46e8af3..bf409da 100644
--- a/cpukit/libcsupport/src/funlockfile.c
+++ b/cpukit/libcsupport/src/funlockfile.c
@@ -24,8 +24,9 @@
 /**
  * This is a non-functional stub 
  */
-void funlockfile(FILE* file __attribute__((unused)))
+void funlockfile(FILE* file)
 {
+  (void) file;
 }
 
 #endif
diff --git a/cpukit/libcsupport/src/getpid.c b/cpukit/libcsupport/src/getpid.c
index b2cd19b..53ab2f4 100644
--- a/cpukit/libcsupport/src/getpid.c
+++ b/cpukit/libcsupport/src/getpid.c
@@ -30,7 +30,7 @@ pid_t getpid( void )
  *  This is the Newlib dependent reentrant version of getpid().
  */
 pid_t _getpid_r(
-  struct _reent *ptr __attribute__((unused))
+  struct _reent *ptr RTEMS_UNUSED
 )
 {
   return getpid();
diff --git a/cpukit/libcsupport/src/isatty_r.c b/cpukit/libcsupport/src/isatty_r.c
index 89df9a7..a234172 100644
--- a/cpukit/libcsupport/src/isatty_r.c
+++ b/cpukit/libcsupport/src/isatty_r.c
@@ -28,10 +28,11 @@
 #include <sys/stat.h>
 
 int _isatty_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr,
   int            fd
 )
 {
+  (void) ptr;
   return isatty( fd );
 }
 #endif
diff --git a/cpukit/libcsupport/src/link.c b/cpukit/libcsupport/src/link.c
index 3bec15e..faea544 100644
--- a/cpukit/libcsupport/src/link.c
+++ b/cpukit/libcsupport/src/link.c
@@ -66,7 +66,7 @@ int link( const char *path1, const char *path2 )
  *  This is the Newlib dependent reentrant version of link().
  */
 int _link_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   const char    *path1,
   const char    *path2
 )
diff --git a/cpukit/libcsupport/src/lseek.c b/cpukit/libcsupport/src/lseek.c
index 60c391f..f5c6fa6 100644
--- a/cpukit/libcsupport/src/lseek.c
+++ b/cpukit/libcsupport/src/lseek.c
@@ -39,7 +39,7 @@ off_t lseek( int fd, off_t offset, int whence )
 #include <reent.h>
 
 off_t _lseek_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   int            fd,
   off_t          offset,
   int            whence
diff --git a/cpukit/libcsupport/src/newlibc_reent.c b/cpukit/libcsupport/src/newlibc_reent.c
index 430157c..bf8847c 100644
--- a/cpukit/libcsupport/src/newlibc_reent.c
+++ b/cpukit/libcsupport/src/newlibc_reent.c
@@ -31,7 +31,7 @@
 #include <rtems/score/wkspace.h>
 
 bool newlib_create_hook(
-  rtems_tcb *current_task __attribute__((unused)),
+  rtems_tcb *current_task RTEMS_UNUSED,
   rtems_tcb *creating_task
 )
 {
diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c
index 4fb2ea2..62ce507 100644
--- a/cpukit/libcsupport/src/open.c
+++ b/cpukit/libcsupport/src/open.c
@@ -161,7 +161,7 @@ int open( const char *path, int oflag, ... )
  *  This is the Newlib dependent reentrant version of open().
  */
 int _open_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   const char    *buf,
   int            oflag,
   int            mode
diff --git a/cpukit/libcsupport/src/printk_plugin.c b/cpukit/libcsupport/src/printk_plugin.c
index 9d9f3de..b600378 100644
--- a/cpukit/libcsupport/src/printk_plugin.c
+++ b/cpukit/libcsupport/src/printk_plugin.c
@@ -22,13 +22,15 @@
 #include <rtems/bspIo.h>
 
 int printk_plugin(
-  void *ignored __attribute__((unused)),
+  void *ignored,
   const char *format,
   ...
 )
 {
   va_list arg_pointer;
 
+  (void) ignored;
+
   va_start (arg_pointer, format);
 
   vprintk( format, arg_pointer );
diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c
index 10b4e4e..a5df6a1 100644
--- a/cpukit/libcsupport/src/read.c
+++ b/cpukit/libcsupport/src/read.c
@@ -53,7 +53,7 @@ ssize_t read(
  *  This is the Newlib dependent reentrant version of read().
  */
 ssize_t _read_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   int            fd,
   void          *buf,
   size_t         nbytes
diff --git a/cpukit/libcsupport/src/rtems_heap_null_extend.c b/cpukit/libcsupport/src/rtems_heap_null_extend.c
index d36e00b..329956c 100644
--- a/cpukit/libcsupport/src/rtems_heap_null_extend.c
+++ b/cpukit/libcsupport/src/rtems_heap_null_extend.c
@@ -19,8 +19,8 @@
 #include <rtems/malloc.h>
 
 void *rtems_heap_null_extend(
-  Heap_Control *heap __attribute__((unused)),
-  size_t alloc_size __attribute__((unused))
+  Heap_Control *heap RTEMS_UNUSED,
+  size_t alloc_size RTEMS_UNUSED
 )
 {
   return NULL;
diff --git a/cpukit/libcsupport/src/setpgid.c b/cpukit/libcsupport/src/setpgid.c
index f3251bc..dd810d7 100644
--- a/cpukit/libcsupport/src/setpgid.c
+++ b/cpukit/libcsupport/src/setpgid.c
@@ -17,9 +17,11 @@
  *  4.3.3 Set Process Group ID for Job Control, P1003.1b-1993, p. 89
  */
 int setpgid(
-  pid_t  pid __attribute__((unused)),
-  pid_t  pgid __attribute__((unused))
+  pid_t  pid,
+  pid_t  pgid
 )
 {
+  (void) pid;
+  (void) pgid;
   rtems_set_errno_and_return_minus_one( ENOSYS );
 }
diff --git a/cpukit/libcsupport/src/stat.c b/cpukit/libcsupport/src/stat.c
index 7a48f40..f5b72fa 100644
--- a/cpukit/libcsupport/src/stat.c
+++ b/cpukit/libcsupport/src/stat.c
@@ -69,7 +69,7 @@ int _STAT_NAME( const char *path, struct stat *buf )
  *  Prototype to avoid warnings
  */
 int _STAT_R_NAME(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   const char    *path,
   struct stat   *buf
 );
@@ -78,7 +78,7 @@ int _STAT_R_NAME(
  *  This is the Newlib dependent reentrant version of stat() and lstat().
  */
 int _STAT_R_NAME(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   const char    *path,
   struct stat   *buf
 )
diff --git a/cpukit/libcsupport/src/tcflow.c b/cpukit/libcsupport/src/tcflow.c
index 50763ef..710289c 100644
--- a/cpukit/libcsupport/src/tcflow.c
+++ b/cpukit/libcsupport/src/tcflow.c
@@ -25,10 +25,12 @@
 #include <rtems/seterr.h>
 
 int tcflow (
-  int fd __attribute__((unused)),
+  int fd,
   int action
 )
 {
+  (void) fd;
+
   switch (action) {
     case TCOOFF:
     case TCOON:
diff --git a/cpukit/libcsupport/src/tcgetpgrp.c b/cpukit/libcsupport/src/tcgetpgrp.c
index 5bbf9c6..61585b1 100644
--- a/cpukit/libcsupport/src/tcgetpgrp.c
+++ b/cpukit/libcsupport/src/tcgetpgrp.c
@@ -26,8 +26,9 @@
 /**
  *  POSIX 1003.1b 7.2.3 - Get Foreground Process Group ID
  */
-pid_t tcgetpgrp(int fd __attribute__((unused)))
+pid_t tcgetpgrp(int fd)
 {
+  (void) fd;
   return getpid();
 }
 
diff --git a/cpukit/libcsupport/src/tcsendbreak.c b/cpukit/libcsupport/src/tcsendbreak.c
index 3b2bfa8..0f2e15c 100644
--- a/cpukit/libcsupport/src/tcsendbreak.c
+++ b/cpukit/libcsupport/src/tcsendbreak.c
@@ -30,8 +30,8 @@
 #include <rtems/libio.h>
 
 int tcsendbreak (
-  int fd __attribute__((unused)),
-  int duration __attribute__((unused)) )
+  int fd RTEMS_UNUSED,
+  int duration RTEMS_UNUSED )
 {
   return 0;
 }
diff --git a/cpukit/libcsupport/src/tcsetpgrp.c b/cpukit/libcsupport/src/tcsetpgrp.c
index bb45975..f0bbb1d 100644
--- a/cpukit/libcsupport/src/tcsetpgrp.c
+++ b/cpukit/libcsupport/src/tcsetpgrp.c
@@ -33,8 +33,8 @@
  *  POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID
  */
 int tcsetpgrp(
-  int fd __attribute__((unused)),
-  pid_t pid __attribute__((unused)) )
+  int fd RTEMS_UNUSED,
+  pid_t pid RTEMS_UNUSED )
 {
   return 0;
 }
diff --git a/cpukit/libcsupport/src/unlink.c b/cpukit/libcsupport/src/unlink.c
index de7c712..84b7994 100644
--- a/cpukit/libcsupport/src/unlink.c
+++ b/cpukit/libcsupport/src/unlink.c
@@ -65,7 +65,7 @@ int unlink( const char *path )
  *  This is the Newlib dependent reentrant version of unlink().
  */
 int _unlink_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   const char    *path
 )
 {
diff --git a/cpukit/libcsupport/src/write_r.c b/cpukit/libcsupport/src/write_r.c
index d3b8685..12dabc9 100644
--- a/cpukit/libcsupport/src/write_r.c
+++ b/cpukit/libcsupport/src/write_r.c
@@ -32,7 +32,7 @@
 #include <reent.h>
 
 _ssize_t _write_r(
-  struct _reent *ptr __attribute__((unused)),
+  struct _reent *ptr RTEMS_UNUSED,
   int            fd,
   const void    *buf,
   size_t         nbytes
diff --git a/cpukit/libfs/src/nfsclient/src/dirutils.c b/cpukit/libfs/src/nfsclient/src/dirutils.c
index e392b9a..5dd7fcf 100644
--- a/cpukit/libfs/src/nfsclient/src/dirutils.c
+++ b/cpukit/libfs/src/nfsclient/src/dirutils.c
@@ -365,7 +365,7 @@ cd(char *path)
 }
 
 #ifdef HAVE_CEXP
-static CexpHelpTabRec _cexpHelpTabDirutils[] __attribute__((unused)) = {
+static CexpHelpTabRec _cexpHelpTabDirutils[] RTEMS_UNUSED = {
 	HELP(
 "copy a file: cp(""from"",[""to""[,""-f""]])\n\
                  from = NULL <-- stdin\n\
diff --git a/cpukit/libmisc/capture/capture-cli.c b/cpukit/libmisc/capture/capture-cli.c
index 1a499b4..b9c2edc 100644
--- a/cpukit/libmisc/capture/capture-cli.c
+++ b/cpukit/libmisc/capture/capture-cli.c
@@ -37,7 +37,7 @@
 #include <rtems/monitor.h>
 #include <rtems/cpuuse.h>
 #
-#define RC_UNUSED __attribute__((unused))
+#define RC_UNUSED RTEMS_UNUSED
 
 #define RTEMS_CAPTURE_CLI_MAX_LOAD_TASKS (20)
 
diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c
index c1c1f84..93f2546 100644
--- a/cpukit/libmisc/capture/capture.c
+++ b/cpukit/libmisc/capture/capture.c
@@ -563,7 +563,7 @@ rtems_capture_trigger (rtems_tcb* ft,
  * buffer. It is assumed we have a working heap at stage of initialization.
  */
 rtems_status_code
-rtems_capture_open (uint32_t   size, rtems_capture_timestamp timestamp __attribute__((unused)))
+rtems_capture_open (uint32_t   size, rtems_capture_timestamp timestamp RTEMS_UNUSED)
 {
   rtems_status_code       sc = RTEMS_SUCCESSFUL;
   size_t                  count;
diff --git a/cpukit/libmisc/devnull/devnull.c b/cpukit/libmisc/devnull/devnull.c
index 4aed5eb..6ec70e8 100644
--- a/cpukit/libmisc/devnull/devnull.c
+++ b/cpukit/libmisc/devnull/devnull.c
@@ -44,8 +44,8 @@ static char initialized;
 
 rtems_device_driver null_initialize(
   rtems_device_major_number major,
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   rtems_device_driver status;
@@ -82,9 +82,9 @@ rtems_device_driver null_initialize(
  */
 
 rtems_device_driver null_open(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return NULL_SUCCESSFUL;
@@ -105,9 +105,9 @@ rtems_device_driver null_open(
  */
 
 rtems_device_driver null_close(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return NULL_SUCCESSFUL;
@@ -128,9 +128,9 @@ rtems_device_driver null_close(
  */
 
 rtems_device_driver null_read(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return NULL_SUCCESSFUL;
@@ -151,8 +151,8 @@ rtems_device_driver null_read(
  */
 
 rtems_device_driver null_write(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
   void *pargp
 )
 {
@@ -179,9 +179,9 @@ rtems_device_driver null_write(
  */
 
 rtems_device_driver null_control(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return NULL_SUCCESSFUL;
diff --git a/cpukit/libmisc/devnull/devzero.c b/cpukit/libmisc/devnull/devzero.c
index c2f2f5f..4aecec6 100644
--- a/cpukit/libmisc/devnull/devzero.c
+++ b/cpukit/libmisc/devnull/devzero.c
@@ -31,35 +31,35 @@
 
 rtems_device_driver dev_zero_initialize(
   rtems_device_major_number major,
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *arg __attribute__((unused))
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *arg RTEMS_UNUSED
 )
 {
   return rtems_io_register_name(DEVZERO_DEVICE_NAME, major, 0);
 }
 
 rtems_device_driver dev_zero_open(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *arg __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *arg RTEMS_UNUSED
 )
 {
   return RTEMS_SUCCESSFUL;
 }
 
 rtems_device_driver dev_zero_close(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *arg __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *arg RTEMS_UNUSED
 )
 {
   return RTEMS_SUCCESSFUL;
 }
 
 rtems_device_driver dev_zero_read(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *arg __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *arg RTEMS_UNUSED
 )
 {
   rtems_libio_rw_args_t *rw = arg;
@@ -71,8 +71,8 @@ rtems_device_driver dev_zero_read(
 }
 
 rtems_device_driver dev_zero_write(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
   void *arg
 )
 {
@@ -84,9 +84,9 @@ rtems_device_driver dev_zero_write(
 }
 
 rtems_device_driver dev_zero_control(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *arg __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *arg RTEMS_UNUSED
 )
 {
   return RTEMS_IO_ERROR;
diff --git a/cpukit/libmisc/fb/mw_uid.c b/cpukit/libmisc/fb/mw_uid.c
index 2381089..db98f1f 100644
--- a/cpukit/libmisc/fb/mw_uid.c
+++ b/cpukit/libmisc/fb/mw_uid.c
@@ -36,7 +36,7 @@ static int       open_count = 0;
 /* open a message queue with the kernel */
 int uid_open_queue(
   const char *q_name,
-  int         flags __attribute__((unused)),
+  int         flags RTEMS_UNUSED,
   size_t      max_msgs
 )
 {
diff --git a/cpukit/libmisc/monitor/mon-command.c b/cpukit/libmisc/monitor/mon-command.c
index 99fc0ae..64b102b 100644
--- a/cpukit/libmisc/monitor/mon-command.c
+++ b/cpukit/libmisc/monitor/mon-command.c
@@ -175,7 +175,7 @@ void rtems_monitor_help_cmd(
   int                                argc,
   char                             **argv,
   const rtems_monitor_command_arg_t *command_arg,
-  bool                               verbose __attribute__((unused))
+  bool                               verbose RTEMS_UNUSED
 )
 {
   int arg;
diff --git a/cpukit/libmisc/monitor/mon-config.c b/cpukit/libmisc/monitor/mon-config.c
index 00eec9b..a6674c1 100644
--- a/cpukit/libmisc/monitor/mon-config.c
+++ b/cpukit/libmisc/monitor/mon-config.c
@@ -55,8 +55,8 @@ rtems_monitor_config_canonical(
 
 const void *
 rtems_monitor_config_next(
-    void                  *object_info __attribute__((unused)),
-    rtems_monitor_config_t *canonical_config __attribute__((unused)),
+    void                  *object_info RTEMS_UNUSED,
+    rtems_monitor_config_t *canonical_config RTEMS_UNUSED,
     rtems_id              *next_id
 )
 {
@@ -79,7 +79,7 @@ failed:
 
 void
 rtems_monitor_config_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     fprintf(stdout,"\
@@ -93,7 +93,7 @@ INITIAL (startup) Configuration Info\n");
 int
 rtems_monitor_config_dump(
     rtems_monitor_config_t *monitor_config,
-    bool                 verbose __attribute__((unused))
+    bool                 verbose RTEMS_UNUSED
 )
 {
     int     length = 0;
diff --git a/cpukit/libmisc/monitor/mon-driver.c b/cpukit/libmisc/monitor/mon-driver.c
index 8abe281..ebbf0ec 100644
--- a/cpukit/libmisc/monitor/mon-driver.c
+++ b/cpukit/libmisc/monitor/mon-driver.c
@@ -58,7 +58,7 @@ rtems_monitor_driver_canonical(
 
 const void *
 rtems_monitor_driver_next(
-    void                  *object_info __attribute__((unused)),
+    void                  *object_info RTEMS_UNUSED,
     rtems_monitor_driver_t *canonical_driver,
     rtems_id              *next_id
 )
@@ -88,7 +88,7 @@ failed:
 
 void
 rtems_monitor_driver_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     fprintf(stdout,"\
diff --git a/cpukit/libmisc/monitor/mon-extension.c b/cpukit/libmisc/monitor/mon-extension.c
index e7e4424..89d7170 100644
--- a/cpukit/libmisc/monitor/mon-extension.c
+++ b/cpukit/libmisc/monitor/mon-extension.c
@@ -41,7 +41,7 @@ rtems_monitor_extension_canonical(
 
 void
 rtems_monitor_extension_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     fprintf(stdout,"\
diff --git a/cpukit/libmisc/monitor/mon-itask.c b/cpukit/libmisc/monitor/mon-itask.c
index a1cca30..d686b41 100644
--- a/cpukit/libmisc/monitor/mon-itask.c
+++ b/cpukit/libmisc/monitor/mon-itask.c
@@ -35,7 +35,7 @@ rtems_monitor_init_task_canonical(
 
 const void *
 rtems_monitor_init_task_next(
-    void                  *object_info __attribute__((unused)),
+    void                  *object_info RTEMS_UNUSED,
     rtems_monitor_init_task_t *canonical_init_task,
     rtems_id              *next_id
 )
@@ -68,7 +68,7 @@ failed:
 
 void
 rtems_monitor_init_task_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     fprintf(stdout,"\
diff --git a/cpukit/libmisc/monitor/mon-monitor.c b/cpukit/libmisc/monitor/mon-monitor.c
index 34c85fe..fe292f2 100644
--- a/cpukit/libmisc/monitor/mon-monitor.c
+++ b/cpukit/libmisc/monitor/mon-monitor.c
@@ -297,10 +297,10 @@ rtems_monitor_wakeup(void)
 }
 
 void rtems_monitor_debugger_cmd(
-  int                                argc __attribute__((unused)),
-  char                             **argv __attribute__((unused)),
-  const rtems_monitor_command_arg_t *command_arg __attribute__((unused)),
-  bool                               verbose __attribute__((unused))
+  int                                argc RTEMS_UNUSED,
+  char                             **argv RTEMS_UNUSED,
+  const rtems_monitor_command_arg_t *command_arg RTEMS_UNUSED,
+  bool                               verbose RTEMS_UNUSED
 )
 {
 #ifdef CPU_INVOKE_DEBUGGER
@@ -311,8 +311,8 @@ void rtems_monitor_debugger_cmd(
 void rtems_monitor_pause_cmd(
   int                                argc,
   char                             **argv,
-  const rtems_monitor_command_arg_t *command_arg __attribute__((unused)),
-  bool                               verbose __attribute__((unused))
+  const rtems_monitor_command_arg_t *command_arg RTEMS_UNUSED,
+  bool                               verbose RTEMS_UNUSED
 )
 {
     if (argc == 1)
@@ -325,7 +325,7 @@ void rtems_monitor_fatal_cmd(
   int                                argc,
   char                             **argv,
   const rtems_monitor_command_arg_t *command_arg,
-  bool                               verbose __attribute__((unused))
+  bool                               verbose RTEMS_UNUSED
 )
 {
     if (argc == 1)
@@ -335,10 +335,10 @@ void rtems_monitor_fatal_cmd(
 }
 
 void rtems_monitor_continue_cmd(
-  int                                argc __attribute__((unused)),
-  char                             **argv __attribute__((unused)),
-  const rtems_monitor_command_arg_t *command_arg __attribute__((unused)),
-  bool                               verbose __attribute__((unused))
+  int                                argc RTEMS_UNUSED,
+  char                             **argv RTEMS_UNUSED,
+  const rtems_monitor_command_arg_t *command_arg RTEMS_UNUSED,
+  bool                               verbose RTEMS_UNUSED
 )
 {
     rtems_monitor_suspend(RTEMS_NO_TIMEOUT);
@@ -348,8 +348,8 @@ void rtems_monitor_continue_cmd(
 void rtems_monitor_node_cmd(
   int                                argc,
   char                             **argv,
-  const rtems_monitor_command_arg_t *command_arg __attribute__((unused)),
-  bool                               verbose __attribute__((unused))
+  const rtems_monitor_command_arg_t *command_arg RTEMS_UNUSED,
+  bool                               verbose RTEMS_UNUSED
 )
 {
   uint32_t   new_node = rtems_monitor_default_node;
diff --git a/cpukit/libmisc/monitor/mon-network.c b/cpukit/libmisc/monitor/mon-network.c
index 6f84bdf..2140044 100644
--- a/cpukit/libmisc/monitor/mon-network.c
+++ b/cpukit/libmisc/monitor/mon-network.c
@@ -28,8 +28,8 @@
 #include <rtems/monitor.h>
 
 void mon_ifconfig(int argc, char *argv[],
-  uint32_t command_arg __attribute__((unused)),
-  bool verbose __attribute__((unused)))
+  uint32_t command_arg RTEMS_UNUSED,
+  bool verbose RTEMS_UNUSED)
 {
     struct sockaddr_in  ipaddr;
     struct sockaddr_in  dstaddr;
@@ -233,8 +233,8 @@ void mon_ifconfig(int argc, char *argv[],
 
 
 void mon_route(int argc, char *argv[],
-  uint32_t command_arg __attribute__((unused)),
-  bool verbose __attribute__((unused)))
+  uint32_t command_arg RTEMS_UNUSED,
+  bool verbose RTEMS_UNUSED)
 {
     int                cmd;
     struct sockaddr_in dst;
diff --git a/cpukit/libmisc/monitor/mon-part.c b/cpukit/libmisc/monitor/mon-part.c
index 84624c5..713e106 100644
--- a/cpukit/libmisc/monitor/mon-part.c
+++ b/cpukit/libmisc/monitor/mon-part.c
@@ -30,7 +30,7 @@ rtems_monitor_part_canonical(
 
 void
 rtems_monitor_part_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     printf("\
@@ -47,7 +47,7 @@ rtems_monitor_part_dump_header(
 void
 rtems_monitor_part_dump(
     rtems_monitor_part_t *monitor_part,
-    bool  verbose __attribute__((unused))
+    bool  verbose RTEMS_UNUSED
 )
 {
     int length = 0;
diff --git a/cpukit/libmisc/monitor/mon-queue.c b/cpukit/libmisc/monitor/mon-queue.c
index 9a77d55..9430797 100644
--- a/cpukit/libmisc/monitor/mon-queue.c
+++ b/cpukit/libmisc/monitor/mon-queue.c
@@ -24,7 +24,7 @@ rtems_monitor_queue_canonical(
 
 void
 rtems_monitor_queue_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     fprintf(stdout,"\
@@ -44,7 +44,7 @@ rtems_monitor_queue_dump_header(
 void
 rtems_monitor_queue_dump(
     rtems_monitor_queue_t *monitor_queue,
-    bool  verbose __attribute__((unused))
+    bool  verbose RTEMS_UNUSED
 )
 {
     uint32_t              length = 0;
diff --git a/cpukit/libmisc/monitor/mon-region.c b/cpukit/libmisc/monitor/mon-region.c
index f6fdd02..289a00b 100644
--- a/cpukit/libmisc/monitor/mon-region.c
+++ b/cpukit/libmisc/monitor/mon-region.c
@@ -31,7 +31,7 @@ rtems_monitor_region_canonical(
 
 void
 rtems_monitor_region_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     printf("\
@@ -48,7 +48,7 @@ rtems_monitor_region_dump_header(
 void
 rtems_monitor_region_dump(
     rtems_monitor_region_t *monitor_region,
-    bool  verbose __attribute__((unused))
+    bool  verbose RTEMS_UNUSED
 )
 {
     int length = 0;
diff --git a/cpukit/libmisc/monitor/mon-sema.c b/cpukit/libmisc/monitor/mon-sema.c
index 1044866..f7e35ed 100644
--- a/cpukit/libmisc/monitor/mon-sema.c
+++ b/cpukit/libmisc/monitor/mon-sema.c
@@ -52,7 +52,7 @@ rtems_monitor_sema_canonical(
 
 void
 rtems_monitor_sema_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     printf("\
@@ -69,7 +69,7 @@ rtems_monitor_sema_dump_header(
 void
 rtems_monitor_sema_dump(
     rtems_monitor_sema_t *monitor_sema,
-    bool  verbose __attribute__((unused))
+    bool  verbose RTEMS_UNUSED
 )
 {
     int length = 0;
diff --git a/cpukit/libmisc/monitor/mon-server.c b/cpukit/libmisc/monitor/mon-server.c
index 109a577..9949f66 100644
--- a/cpukit/libmisc/monitor/mon-server.c
+++ b/cpukit/libmisc/monitor/mon-server.c
@@ -111,7 +111,7 @@ done:
 
 void
 rtems_monitor_server_task(
-    rtems_task_argument monitor_flags __attribute__((unused))
+    rtems_task_argument monitor_flags RTEMS_UNUSED
 )
 {
     rtems_monitor_server_request_t  request;
@@ -214,7 +214,7 @@ rtems_monitor_server_kill(void)
 
 void
 rtems_monitor_server_init(
-    uint32_t   monitor_flags __attribute__((unused))
+    uint32_t   monitor_flags RTEMS_UNUSED
 )
 {
     #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/libmisc/monitor/mon-symbols.c b/cpukit/libmisc/monitor/mon-symbols.c
index b434b12..57d3604 100644
--- a/cpukit/libmisc/monitor/mon-symbols.c
+++ b/cpukit/libmisc/monitor/mon-symbols.c
@@ -299,7 +299,7 @@ rtems_symbol_name_lookup(
 const void *
 rtems_monitor_symbol_next(
     void                   *object_info,
-    rtems_monitor_symbol_t *canonical __attribute__((unused)),
+    rtems_monitor_symbol_t *canonical RTEMS_UNUSED,
     rtems_id               *next_id
 )
 {
@@ -419,7 +419,7 @@ rtems_monitor_symbol_dump(
 static void
 rtems_monitor_symbol_dump_all(
     rtems_symbol_table_t *table,
-    bool                  verbose __attribute__((unused))
+    bool                  verbose RTEMS_UNUSED
 )
 {
     uint32_t   s;
diff --git a/cpukit/libmisc/monitor/mon-task.c b/cpukit/libmisc/monitor/mon-task.c
index 0d65557..910dd9d 100644
--- a/cpukit/libmisc/monitor/mon-task.c
+++ b/cpukit/libmisc/monitor/mon-task.c
@@ -55,7 +55,7 @@ rtems_monitor_task_canonical(
 
 void
 rtems_monitor_task_dump_header(
-    bool verbose __attribute__((unused))
+    bool verbose RTEMS_UNUSED
 )
 {
     fprintf(stdout,"\
@@ -71,7 +71,7 @@ ID         NAME       CPU PRI STATE  MODES    EVENTS WAITID   WAITQUEUE\n"); /*
 void
 rtems_monitor_task_dump(
     rtems_monitor_task_t *monitor_task,
-    bool                  verbose __attribute__((unused))
+    bool                  verbose RTEMS_UNUSED
 )
 {
     int length = 0;
diff --git a/cpukit/libmisc/serdbg/termios_printk.c b/cpukit/libmisc/serdbg/termios_printk.c
index 082f45b..01ed334 100644
--- a/cpukit/libmisc/serdbg/termios_printk.c
+++ b/cpukit/libmisc/serdbg/termios_printk.c
@@ -43,7 +43,7 @@ int termios_printk_fd = -1;
 struct rtems_termios_tty *termios_printk_tty;
 
 static void _termios_printk_null_char(
-	char c __attribute__((unused)))
+	char c RTEMS_UNUSED)
 {
   return;
 }
diff --git a/cpukit/libmisc/shell/cmds.c b/cpukit/libmisc/shell/cmds.c
index 6e3e0c1..dbc6363 100644
--- a/cpukit/libmisc/shell/cmds.c
+++ b/cpukit/libmisc/shell/cmds.c
@@ -45,7 +45,7 @@ int rtems_shell_main_monitor(int argc, char **argv) {
   return 0;
 }
 
-static bool rtems_shell_register_command(const rtems_monitor_command_entry_t *e, void *arg __attribute__((unused)))
+static bool rtems_shell_register_command(const rtems_monitor_command_entry_t *e, void *arg RTEMS_UNUSED)
 {
   /* Exclude EXIT (alias quit)*/
   if (strcmp("exit", e->command) != 0) {
diff --git a/cpukit/libmisc/shell/err.h b/cpukit/libmisc/shell/err.h
index f028d3b..6e64e8d 100644
--- a/cpukit/libmisc/shell/err.h
+++ b/cpukit/libmisc/shell/err.h
@@ -59,6 +59,7 @@
 #define vwarnx rtems_shell_vwarnx
 
 #include <setjmp.h>
+#include <rtems.h>
 
 extern  jmp_buf rtems_shell_bsd_exit_recover;
 
diff --git a/cpukit/libmisc/shell/extern-cp.h b/cpukit/libmisc/shell/extern-cp.h
index 093b30f..7c5ca30 100644
--- a/cpukit/libmisc/shell/extern-cp.h
+++ b/cpukit/libmisc/shell/extern-cp.h
@@ -43,6 +43,7 @@ typedef struct {
 } PATH_T;
 
 #include <setjmp.h>
+#include <rtems.h>
 
 typedef struct {
   PATH_T to;
diff --git a/cpukit/libmisc/shell/extern-ls.h b/cpukit/libmisc/shell/extern-ls.h
index 33f713b..99ac3ac 100644
--- a/cpukit/libmisc/shell/extern-ls.h
+++ b/cpukit/libmisc/shell/extern-ls.h
@@ -41,6 +41,7 @@
 
 #include <sys/cdefs.h>
 #include <setjmp.h>
+#include <rtems.h>
 
 #define major(d) rtems_filesystem_dev_major_t(d)
 #define minor(d) rtems_filesystem_dev_minor_t(d)
diff --git a/cpukit/libmisc/shell/hexdump-odsyntax.c b/cpukit/libmisc/shell/hexdump-odsyntax.c
index 18fd223..b69bc51 100644
--- a/cpukit/libmisc/shell/hexdump-odsyntax.c
+++ b/cpukit/libmisc/shell/hexdump-odsyntax.c
@@ -62,7 +62,7 @@ __FBSDID("$FreeBSD: src/usr.bin/hexdump/odsyntax.c,v 1.17 2004/07/22 13:14:42 jo
 #define PADDING	"         "
 
 #ifndef __unused
-#define __unused __attribute((__unused__))
+#define __unused RTEMS_UNUSED
 #endif
 
 #if RTEMS_REMOVED
diff --git a/cpukit/libmisc/shell/main_dd.c b/cpukit/libmisc/shell/main_dd.c
index 72f9c60..e9c8bf3 100644
--- a/cpukit/libmisc/shell/main_dd.c
+++ b/cpukit/libmisc/shell/main_dd.c
@@ -77,7 +77,7 @@ __FBSDID("$FreeBSD: src/bin/dd/dd.c,v 1.43 2004/08/15 19:10:05 rwatson Exp $");
 #include "extern-dd.h"
 
 #ifndef __unused
-#define __unused __attribute((__unused__))
+#define __unused RTEMS_UNUSED
 #endif
 
 #define DD_DEFFILEMODE 0
diff --git a/cpukit/libmisc/shell/main_halt.c b/cpukit/libmisc/shell/main_halt.c
index a7a7d2d..f0a216b 100644
--- a/cpukit/libmisc/shell/main_halt.c
+++ b/cpukit/libmisc/shell/main_halt.c
@@ -20,8 +20,8 @@
 #include "internal.h"
 
 static int rtems_shell_main_shutdown(
-  int   argc __attribute__((unused)),
-  char *argv[] __attribute__((unused))
+  int   argc RTEMS_UNUSED,
+  char *argv[] RTEMS_UNUSED
 )
 {
   fprintf(stdout, "System shutting down at user request\n");
diff --git a/cpukit/libmisc/shell/main_id.c b/cpukit/libmisc/shell/main_id.c
index 19f79cc..2d2b05f 100644
--- a/cpukit/libmisc/shell/main_id.c
+++ b/cpukit/libmisc/shell/main_id.c
@@ -27,8 +27,8 @@
 #include "internal.h"
 
 static int rtems_shell_main_id(
-  int   argc __attribute__((unused)),
-  char *argv[] __attribute__((unused))
+  int   argc RTEMS_UNUSED,
+  char *argv[] RTEMS_UNUSED
 )
 {
   struct passwd *pwd;
diff --git a/cpukit/libmisc/shell/main_logoff.c b/cpukit/libmisc/shell/main_logoff.c
index e902744..67a2967 100644
--- a/cpukit/libmisc/shell/main_logoff.c
+++ b/cpukit/libmisc/shell/main_logoff.c
@@ -21,8 +21,8 @@
 #include "internal.h"
 
 static int rtems_shell_main_logoff(
-  int   argc __attribute__((unused)),
-  char *argv[] __attribute__((unused))
+  int   argc RTEMS_UNUSED,
+  char *argv[] RTEMS_UNUSED
 )
 {
   rtems_shell_env_t *env = rtems_shell_get_current_env();
diff --git a/cpukit/libmisc/shell/main_mount_nfs.c b/cpukit/libmisc/shell/main_mount_nfs.c
index 1784f48..8a2aaa4 100644
--- a/cpukit/libmisc/shell/main_mount_nfs.c
+++ b/cpukit/libmisc/shell/main_mount_nfs.c
@@ -29,8 +29,8 @@ static int
 rtems_shell_nfs_mounter (
   const char*                device,
   const char*                mntpoint,
-  rtems_shell_filesystems_t* fs __attribute__((unused)),
-  rtems_filesystem_options_t options __attribute__((unused)))
+  rtems_shell_filesystems_t* fs RTEMS_UNUSED,
+  rtems_filesystem_options_t options RTEMS_UNUSED)
 {
   char* uidhost;
   char* path;
diff --git a/cpukit/libmisc/shell/main_pwd.c b/cpukit/libmisc/shell/main_pwd.c
index 1c0a077..ea657dc 100644
--- a/cpukit/libmisc/shell/main_pwd.c
+++ b/cpukit/libmisc/shell/main_pwd.c
@@ -22,8 +22,8 @@
 #include "internal.h"
 
 static int rtems_shell_main_pwd(
-  int   argc __attribute__((unused)),
-  char *argv[] __attribute__((unused))
+  int   argc RTEMS_UNUSED,
+  char *argv[] RTEMS_UNUSED
 )
 {
   char dir[1024];
diff --git a/cpukit/libmisc/shell/main_stackuse.c b/cpukit/libmisc/shell/main_stackuse.c
index 51045ca..74d47e1 100644
--- a/cpukit/libmisc/shell/main_stackuse.c
+++ b/cpukit/libmisc/shell/main_stackuse.c
@@ -21,8 +21,8 @@
 #include "internal.h"
 
 static int rtems_shell_main_stackuse(
-  int   argc __attribute__((unused)),
-  char *argv[] __attribute__((unused))
+  int   argc RTEMS_UNUSED,
+  char *argv[] RTEMS_UNUSED
 )
 {
   rtems_stack_checker_report_usage_with_plugin(
diff --git a/cpukit/libmisc/shell/main_tty.c b/cpukit/libmisc/shell/main_tty.c
index 0c24862..29dc673 100644
--- a/cpukit/libmisc/shell/main_tty.c
+++ b/cpukit/libmisc/shell/main_tty.c
@@ -24,8 +24,8 @@
 #include "internal.h"
 
 static int rtems_shell_main_tty(
-  int   argc __attribute__((unused)),
-  char *argv[] __attribute__((unused))
+  int   argc RTEMS_UNUSED,
+  char *argv[] RTEMS_UNUSED
 )
 {
   printf("%s\n", ttyname(fileno(stdin)));
diff --git a/cpukit/libmisc/shell/main_whoami.c b/cpukit/libmisc/shell/main_whoami.c
index a0222b1..8771c66 100644
--- a/cpukit/libmisc/shell/main_whoami.c
+++ b/cpukit/libmisc/shell/main_whoami.c
@@ -25,8 +25,8 @@
 #include "internal.h"
 
 static int rtems_shell_main_whoami(
-  int   argc __attribute__((unused)),
-  char *argv[] __attribute__((unused))
+  int   argc RTEMS_UNUSED,
+  char *argv[] RTEMS_UNUSED
 )
 {
   struct passwd *pwd;
diff --git a/cpukit/libmisc/shell/main_wkspaceinfo.c b/cpukit/libmisc/shell/main_wkspaceinfo.c
index a990652..6abebf0 100644
--- a/cpukit/libmisc/shell/main_wkspaceinfo.c
+++ b/cpukit/libmisc/shell/main_wkspaceinfo.c
@@ -30,8 +30,8 @@ void rtems_shell_print_unified_work_area_message(void)
 }
 
 static int rtems_shell_main_wkspace_info(
-  int   argc __attribute__((unused)),
-  char *argv[] __attribute__((unused))
+  int   argc RTEMS_UNUSED,
+  char *argv[] RTEMS_UNUSED
 )
 {
   Heap_Information_block info;
diff --git a/cpukit/libmisc/shell/shell_script.c b/cpukit/libmisc/shell/shell_script.c
index b46e124..2df4679 100644
--- a/cpukit/libmisc/shell/shell_script.c
+++ b/cpukit/libmisc/shell/shell_script.c
@@ -237,7 +237,7 @@ rtems_shell_cmd_t rtems_shell_JOEL_Command = {
  *  appears to be a shell script.
  */
 int rtems_shell_script_file(
-  int   argc __attribute__((unused)),
+  int   argc RTEMS_UNUSED,
   char *argv[]
 )
 {
diff --git a/cpukit/libmisc/shell/utils-cp.c b/cpukit/libmisc/shell/utils-cp.c
index 4eab78e..3a959d5 100644
--- a/cpukit/libmisc/shell/utils-cp.c
+++ b/cpukit/libmisc/shell/utils-cp.c
@@ -85,7 +85,7 @@ set_utimes(const char *file, struct stat *fs)
 }
 
 int
-copy_file(rtems_shell_cp_globals* cp_globals __attribute__((unused)), FTSENT *entp, int dne)
+copy_file(rtems_shell_cp_globals* cp_globals RTEMS_UNUSED, FTSENT *entp, int dne)
 {
 #define MAX_READ max_read
   int max_read;
@@ -415,7 +415,7 @@ setfile(rtems_shell_cp_globals* cp_globals, struct stat *fs, int fd)
 }
 
 int
-preserve_fd_acls(int source_fd __attribute__((unused)), int dest_fd __attribute__((unused)))
+preserve_fd_acls(int source_fd RTEMS_UNUSED, int dest_fd RTEMS_UNUSED)
 {
 #if 0
 	struct acl *aclp;
@@ -441,7 +441,7 @@ preserve_fd_acls(int source_fd __attribute__((unused)), int dest_fd __attribute_
 }
 
 int
-preserve_dir_acls(struct stat *fs __attribute__((unused)), char *source_dir __attribute__((unused)), char *dest_dir __attribute__((unused)))
+preserve_dir_acls(struct stat *fs RTEMS_UNUSED, char *source_dir RTEMS_UNUSED, char *dest_dir RTEMS_UNUSED)
 {
 #if 0
 	acl_t (*aclgetf)(const char *, acl_type_t);
diff --git a/cpukit/libmisc/shell/utils-ls.c b/cpukit/libmisc/shell/utils-ls.c
index 7ff0d1b..c476d0a 100644
--- a/cpukit/libmisc/shell/utils-ls.c
+++ b/cpukit/libmisc/shell/utils-ls.c
@@ -92,7 +92,7 @@ safe_print(rtems_shell_ls_globals* globals, const char *src)
 }
 
 int
-printescaped(rtems_shell_ls_globals* globals __attribute__((unused)), const char *src)
+printescaped(rtems_shell_ls_globals* globals RTEMS_UNUSED, const char *src)
 {
 	unsigned char c;
 	int n;
diff --git a/cpukit/libmisc/shell/verr.c b/cpukit/libmisc/shell/verr.c
index 301e229..9cb5d0c 100644
--- a/cpukit/libmisc/shell/verr.c
+++ b/cpukit/libmisc/shell/verr.c
@@ -58,7 +58,7 @@ __weak_alias(verr, _verr)
 #endif
 
 __dead void
-verr(jmp_buf* exit_jmp, int eval __attribute__((unused)), const char *fmt, _BSD_VA_LIST_ ap)
+verr(jmp_buf* exit_jmp, int eval RTEMS_UNUSED, const char *fmt, _BSD_VA_LIST_ ap)
 {
 	int sverrno;
 
diff --git a/cpukit/libmisc/shell/verrx.c b/cpukit/libmisc/shell/verrx.c
index 30355dd..468500d 100644
--- a/cpukit/libmisc/shell/verrx.c
+++ b/cpukit/libmisc/shell/verrx.c
@@ -56,7 +56,7 @@ __weak_alias(verrx, _verrx)
 #endif
 
 __dead void
-verrx(jmp_buf* exit_jmp, int eval __attribute__((unused)), const char *fmt, _BSD_VA_LIST_ ap)
+verrx(jmp_buf* exit_jmp, int eval RTEMS_UNUSED, const char *fmt, _BSD_VA_LIST_ ap)
 {
 #if 0
 	(void)fprintf(stderr, "%s: ", getprogname());
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index a442798..9c6932e 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -182,7 +182,7 @@ static void Stack_check_Initialize( void )
  *  rtems_stack_checker_create_extension
  */
 bool rtems_stack_checker_create_extension(
-  Thread_Control *running __attribute__((unused)),
+  Thread_Control *running RTEMS_UNUSED,
   Thread_Control *the_thread
 )
 {
@@ -276,8 +276,8 @@ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
  *  rtems_stack_checker_switch_extension
  */
 void rtems_stack_checker_switch_extension(
-  Thread_Control *running __attribute__((unused)),
-  Thread_Control *heir __attribute__((unused))
+  Thread_Control *running RTEMS_UNUSED,
+  Thread_Control *heir RTEMS_UNUSED
 )
 {
   Stack_Control *the_stack = &running->Start.Initial_stack;
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
index c47d037..da57ad7 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/libnetworking/lib/tftpDriver.c
@@ -968,8 +968,8 @@ static ssize_t rtems_tftp_write(
  * Dummy version to let fopen(xxxx,"w") work properly.
  */
 static int rtems_tftp_ftruncate(
-    rtems_libio_t   *iop __attribute__((unused)),
-    off_t            count __attribute__((unused))
+    rtems_libio_t   *iop RTEMS_UNUSED,
+    off_t            count RTEMS_UNUSED
 )
 {
     return 0;
diff --git a/cpukit/posix/src/_execve.c b/cpukit/posix/src/_execve.c
index 53cb36d..4da47cf 100644
--- a/cpukit/posix/src/_execve.c
+++ b/cpukit/posix/src/_execve.c
@@ -28,10 +28,13 @@
 #include <sys/unistd.h>
 
 int _execve(
-  const char *path __attribute__((unused)),
-  char *const argv[] __attribute__((unused)),
-  char *const envp[] __attribute__((unused))
+  const char *path,
+  char *const argv[],
+  char *const envp[]
 )
 {
+  (void) path;
+  (void) argv;
+  (void) envp;
   rtems_set_errno_and_return_minus_one( ENOSYS );
 }
diff --git a/cpukit/posix/src/aio_suspend.c b/cpukit/posix/src/aio_suspend.c
index 3d7017e..2a3362a 100644
--- a/cpukit/posix/src/aio_suspend.c
+++ b/cpukit/posix/src/aio_suspend.c
@@ -27,9 +27,9 @@
 #include <rtems/seterr.h>
 
 int aio_suspend(
-  const struct aiocb  * const list[] __attribute__((unused)),
-  int                     nent __attribute__((unused)),
-  const struct timespec  *timeout __attribute__((unused))
+  const struct aiocb  * const list[] RTEMS_UNUSED,
+  int                     nent RTEMS_UNUSED,
+  const struct timespec  *timeout RTEMS_UNUSED
 )
 {
   rtems_set_errno_and_return_minus_one( ENOSYS );
diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
index 7045a9c..e85622f 100644
--- a/cpukit/posix/src/alarm.c
+++ b/cpukit/posix/src/alarm.c
@@ -33,8 +33,8 @@
  *  _POSIX_signals_Alarm_TSR
  */
 static void _POSIX_signals_Alarm_TSR(
-  Objects_Id      id __attribute__((unused)),
-  void           *argument __attribute__((unused))
+  Objects_Id      id RTEMS_UNUSED,
+  void           *argument RTEMS_UNUSED
 )
 {
   #if defined(RTEMS_DEBUG)
diff --git a/cpukit/posix/src/lio_listio.c b/cpukit/posix/src/lio_listio.c
index b8390d3..fb3c3a2 100644
--- a/cpukit/posix/src/lio_listio.c
+++ b/cpukit/posix/src/lio_listio.c
@@ -27,10 +27,10 @@
 #include <rtems/seterr.h>
 
 int lio_listio(
-  int              mode __attribute__((unused)),
-  struct aiocb    *__restrict const  list[__restrict] __attribute__((unused)),
-  int              nent __attribute__((unused)),
-  struct sigevent *__restrict sig __attribute__((unused))
+  int              mode RTEMS_UNUSED,
+  struct aiocb    *__restrict const  list[__restrict] RTEMS_UNUSED,
+  int              nent RTEMS_UNUSED,
+  struct sigevent *__restrict sig RTEMS_UNUSED
 )
 {
   rtems_set_errno_and_return_minus_one( ENOSYS );
diff --git a/cpukit/posix/src/mmap.c b/cpukit/posix/src/mmap.c
index 90c6d0a..1453ee0 100644
--- a/cpukit/posix/src/mmap.c
+++ b/cpukit/posix/src/mmap.c
@@ -18,13 +18,19 @@
 #include <sys/mman.h>
 
 void *mmap(
-  void   *addr __attribute__((unused)),
-  size_t  lenhth __attribute__((unused)),
-  int     prot __attribute__((unused)),
-  int     flags __attribute__((unused)),
-  int     fildes __attribute__((unused)),
+  void   *addr,
+  size_t  lenhth,
+  int     prot,
+  int     flags,
+  int     fildes,
   off_t   off
 )
 {
+  (void) addr;
+  (void) lenhth;
+  (void) prot;
+  (void) flags;
+  (void) fildes;
+  (void) off;
   return MAP_FAILED;
 }
diff --git a/cpukit/posix/src/mprotect.c b/cpukit/posix/src/mprotect.c
index 94bd316..7158383 100644
--- a/cpukit/posix/src/mprotect.c
+++ b/cpukit/posix/src/mprotect.c
@@ -31,9 +31,13 @@
 #include <sys/mman.h>
 
 int mprotect(
-  void *addr __attribute__((unused)),
-  size_t len __attribute__((unused)),
-  int prot __attribute__((unused)) )
+  void *addr,
+  size_t len,
+  int prot
+)
 {
+  (void) addr;
+  (void) len;
+  (void) prot;
   return 0;
 }
diff --git a/cpukit/posix/src/mqueueopen.c b/cpukit/posix/src/mqueueopen.c
index 1daedc4..005de74 100644
--- a/cpukit/posix/src/mqueueopen.c
+++ b/cpukit/posix/src/mqueueopen.c
@@ -62,7 +62,7 @@ mqd_t mq_open(
    * have it because we have to work through the variable
    * arguments to get to attr.
    */
-  mode_t                          mode RTEMS_COMPILER_UNUSED_ATTRIBUTE;
+  mode_t                          mode RTEMS_UNUSED;
 
   va_list                         arg;
   struct mq_attr                 *attr = NULL;
diff --git a/cpukit/posix/src/munmap.c b/cpukit/posix/src/munmap.c
index 2798326..2496c27 100644
--- a/cpukit/posix/src/munmap.c
+++ b/cpukit/posix/src/munmap.c
@@ -18,9 +18,11 @@
 #include <sys/mman.h>
 
 int munmap(
-  void   *addr __attribute__((unused)),
-  size_t  length __attribute__((unused))
+  void   *addr,
+  size_t  length
 )
 {
+  (void) addr;
+  (void) length;
   return -1;
 }
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index 1f94536..d91a5bf 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -47,7 +47,7 @@ RTEMS_STATIC_ASSERT(
 sigset_t  _POSIX_signals_Pending;
 
 void _POSIX_signals_Abnormal_termination_handler(
-  int signo __attribute__((unused)) )
+  int signo RTEMS_UNUSED )
 {
   exit( 1 );
 }
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 283ffdf..0fbe433 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -103,7 +103,7 @@ static bool _POSIX_Threads_Sporadic_budget_TSR_filter(
  *  _POSIX_Threads_Sporadic_budget_TSR
  */
 void _POSIX_Threads_Sporadic_budget_TSR(
-  Objects_Id      id __attribute__((unused)),
+  Objects_Id      id RTEMS_UNUSED,
   void           *argument
 )
 {
@@ -186,7 +186,7 @@ void _POSIX_Threads_Sporadic_budget_callout(
  */
 
 static bool _POSIX_Threads_Create_extension(
-  Thread_Control *executing __attribute__((unused)),
+  Thread_Control *executing RTEMS_UNUSED,
   Thread_Control *created
 )
 {
diff --git a/cpukit/posix/src/pthreadatfork.c b/cpukit/posix/src/pthreadatfork.c
index 4079376..f3629c1 100644
--- a/cpukit/posix/src/pthreadatfork.c
+++ b/cpukit/posix/src/pthreadatfork.c
@@ -36,10 +36,13 @@
  *   provided."
  */
 int pthread_atfork(
-  void (*prepare)(void) __attribute__((unused)),
-  void (*parent)(void) __attribute__((unused)),
-  void (*child)(void) __attribute__((unused))
+  void (*prepare)(void),
+  void (*parent)(void),
+  void (*child)(void)
 )
 {
+  (void) prepare;
+  (void) parent;
+  (void) child;
   rtems_set_errno_and_return_minus_one( ENOSYS );
 }
diff --git a/cpukit/posix/src/sched_getparam.c b/cpukit/posix/src/sched_getparam.c
index cd030f7..318f5b9 100644
--- a/cpukit/posix/src/sched_getparam.c
+++ b/cpukit/posix/src/sched_getparam.c
@@ -28,8 +28,8 @@
  * 13.3.2 Set Scheduling Parameters, P1003.1b-1993, p. 253
  */
 int sched_getparam(
-  pid_t                     pid __attribute__((unused)),
-  struct sched_param       *param __attribute__((unused))
+  pid_t                     pid RTEMS_UNUSED,
+  struct sched_param       *param RTEMS_UNUSED
 )
 {
   rtems_set_errno_and_return_minus_one( ENOSYS );
diff --git a/cpukit/posix/src/sched_getscheduler.c b/cpukit/posix/src/sched_getscheduler.c
index b746a7c..592a42c 100644
--- a/cpukit/posix/src/sched_getscheduler.c
+++ b/cpukit/posix/src/sched_getscheduler.c
@@ -29,7 +29,7 @@
 #include <rtems/posix/priorityimpl.h>
 
 int sched_getscheduler(
-  pid_t                     pid __attribute__((unused))
+  pid_t                     pid RTEMS_UNUSED
 )
 {
   rtems_set_errno_and_return_minus_one( ENOSYS );
diff --git a/cpukit/posix/src/sched_setparam.c b/cpukit/posix/src/sched_setparam.c
index dbb4530..de5c26f 100644
--- a/cpukit/posix/src/sched_setparam.c
+++ b/cpukit/posix/src/sched_setparam.c
@@ -29,8 +29,8 @@
 #include <rtems/posix/priorityimpl.h>
 
 int sched_setparam(
-  pid_t                     pid __attribute__((unused)),
-  const struct sched_param *param __attribute__((unused))
+  pid_t                     pid RTEMS_UNUSED,
+  const struct sched_param *param RTEMS_UNUSED
 )
 {
   rtems_set_errno_and_return_minus_one( ENOSYS );
diff --git a/cpukit/posix/src/sched_setscheduler.c b/cpukit/posix/src/sched_setscheduler.c
index 1fe7631..9e3b01b 100644
--- a/cpukit/posix/src/sched_setscheduler.c
+++ b/cpukit/posix/src/sched_setscheduler.c
@@ -27,9 +27,9 @@
 #include <rtems/posix/priorityimpl.h>
 
 int sched_setscheduler(
-  pid_t                     pid __attribute__((unused)),
-  int                       policy __attribute__((unused)),
-  const struct sched_param *param __attribute__((unused))
+  pid_t                     pid RTEMS_UNUSED,
+  int                       policy RTEMS_UNUSED,
+  const struct sched_param *param RTEMS_UNUSED
 )
 {
   rtems_set_errno_and_return_minus_one( ENOSYS );
diff --git a/cpukit/posix/src/semopen.c b/cpukit/posix/src/semopen.c
index 3a9dc63..fe0dbeb 100644
--- a/cpukit/posix/src/semopen.c
+++ b/cpukit/posix/src/semopen.c
@@ -55,7 +55,7 @@ sem_t *sem_open(
    * have it because we have to work through the variable
    * arguments to get to attr.
    */
-  mode_t                     mode RTEMS_COMPILER_UNUSED_ATTRIBUTE;
+  mode_t                     mode RTEMS_UNUSED;
 
   va_list                    arg;
   unsigned int               value = 0;
diff --git a/cpukit/posix/src/timertsr.c b/cpukit/posix/src/timertsr.c
index efbfd31..092bf16 100644
--- a/cpukit/posix/src/timertsr.c
+++ b/cpukit/posix/src/timertsr.c
@@ -32,7 +32,7 @@
  *  This is the operation that is run when a timer expires
  */
 void _POSIX_Timer_TSR(
-  Objects_Id timer __attribute__((unused)),
+  Objects_Id timer RTEMS_UNUSED,
   void *data)
 {
   POSIX_Timer_Control *ptimer;
diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c
index 256d91b..9607d3f 100644
--- a/cpukit/posix/src/ualarm.c
+++ b/cpukit/posix/src/ualarm.c
@@ -40,8 +40,8 @@ static Watchdog_Control _POSIX_signals_Ualarm_timer = WATCHDOG_INITIALIZER(
  */
 
 static void _POSIX_signals_Ualarm_TSR(
-  Objects_Id      id __attribute__((unused)),
-  void           *argument __attribute__((unused))
+  Objects_Id      id RTEMS_UNUSED,
+  void           *argument RTEMS_UNUSED
 )
 {
   /*
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index 831a40b..3b6723e 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -217,11 +217,14 @@
  *  in a variable argument method.
  */
 #if defined(__GNUC__)
-  #define RTEMS_COMPILER_UNUSED_ATTRIBUTE __attribute__((unused))
+  #define RTEMS_UNUSED __attribute__((__unused__))
 #else
-  #define RTEMS_COMPILER_UNUSED_ATTRIBUTE
+  #define RTEMS_UNUSED
 #endif
 
+/* Provided for backward compatibility */
+#define RTEMS_COMPILER_UNUSED_ATTRIBUTE RTEMS_UNUSED
+
 /**
  *  Instructs the compiler that a specific structure or union members will be
  *  placed so that the least memory is used.
diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h
index 1919cd1..80c50a5 100644
--- a/cpukit/score/include/rtems/score/objectimpl.h
+++ b/cpukit/score/include/rtems/score/objectimpl.h
@@ -774,7 +774,7 @@ RTEMS_INLINE_ROUTINE bool _Objects_Is_local_id(
 #if defined(RTEMS_MULTIPROCESSING)
   Objects_Id id
 #else
-  Objects_Id id __attribute__((unused))
+  Objects_Id id RTEMS_UNUSED
 #endif
 )
 {
diff --git a/cpukit/score/include/rtems/score/sysstate.h b/cpukit/score/include/rtems/score/sysstate.h
index 7548c1f..fbdeff9 100644
--- a/cpukit/score/include/rtems/score/sysstate.h
+++ b/cpukit/score/include/rtems/score/sysstate.h
@@ -80,7 +80,7 @@ RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization (
 #if defined(RTEMS_MULTIPROCESSING)
   bool  is_multiprocessing
 #else
-  bool  is_multiprocessing __attribute__((unused))
+  bool  is_multiprocessing RTEMS_UNUSED
 #endif
 )
 {
diff --git a/cpukit/score/src/corebarrierrelease.c b/cpukit/score/src/corebarrierrelease.c
index 98865ec..c6d29b9 100644
--- a/cpukit/score/src/corebarrierrelease.c
+++ b/cpukit/score/src/corebarrierrelease.c
@@ -29,8 +29,8 @@ uint32_t _CORE_barrier_Release(
   Objects_Id                           id,
   CORE_barrier_API_mp_support_callout  api_barrier_mp_support
 #else
-  Objects_Id                           id __attribute__((unused)),
-  CORE_barrier_API_mp_support_callout  api_barrier_mp_support __attribute__((unused))
+  Objects_Id                           id RTEMS_UNUSED,
+  CORE_barrier_API_mp_support_callout  api_barrier_mp_support RTEMS_UNUSED
 #endif
 )
 {
diff --git a/cpukit/score/src/coremsgbroadcast.c b/cpukit/score/src/coremsgbroadcast.c
index 3ee587c..95a8650 100644
--- a/cpukit/score/src/coremsgbroadcast.c
+++ b/cpukit/score/src/coremsgbroadcast.c
@@ -29,8 +29,8 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
     Objects_Id                                 id,
     CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
   #else
-    Objects_Id                                 id __attribute__((unused)),
-    CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support __attribute__((unused)),
+    Objects_Id                                 id RTEMS_UNUSED,
+    CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support RTEMS_UNUSED,
   #endif
   uint32_t                                  *count,
   ISR_lock_Context                          *lock_context
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c
index 351c76b..d068cc4 100644
--- a/cpukit/score/src/coremsgsubmit.c
+++ b/cpukit/score/src/coremsgsubmit.c
@@ -34,7 +34,7 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
   #if defined(RTEMS_MULTIPROCESSING)
     CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
   #else
-    CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support  __attribute__((unused)),
+    CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support  RTEMS_UNUSED,
   #endif
   CORE_message_queue_Submit_types            submit_type,
   bool                                       wait,
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c
index 7d9c57f..b4e69c8 100644
--- a/cpukit/score/src/coremutexsurrender.c
+++ b/cpukit/score/src/coremutexsurrender.c
@@ -91,8 +91,8 @@ CORE_mutex_Status _CORE_mutex_Surrender(
   Objects_Id                         id,
   CORE_mutex_API_mp_support_callout  api_mutex_mp_support,
 #else
-  Objects_Id                         id __attribute__((unused)),
-  CORE_mutex_API_mp_support_callout  api_mutex_mp_support __attribute__((unused)),
+  Objects_Id                         id RTEMS_UNUSED,
+  CORE_mutex_API_mp_support_callout  api_mutex_mp_support RTEMS_UNUSED,
 #endif
   ISR_lock_Context                  *lock_context
 )
diff --git a/cpukit/score/src/heapextend.c b/cpukit/score/src/heapextend.c
index 34d2b75..00e402a 100644
--- a/cpukit/score/src/heapextend.c
+++ b/cpukit/score/src/heapextend.c
@@ -121,7 +121,7 @@ uintptr_t _Heap_Extend(
   Heap_Control *heap,
   void *extend_area_begin_ptr,
   uintptr_t extend_area_size,
-  uintptr_t unused __attribute__((unused))
+  uintptr_t unused RTEMS_UNUSED
 )
 {
   Heap_Statistics *const stats = &heap->stats;
diff --git a/cpukit/score/src/heapgetinfo.c b/cpukit/score/src/heapgetinfo.c
index 287d269..36afe95 100644
--- a/cpukit/score/src/heapgetinfo.c
+++ b/cpukit/score/src/heapgetinfo.c
@@ -24,7 +24,7 @@
 #include <rtems/score/heapimpl.h>
 
 static bool _Heap_Get_information_visitor(
-  const Heap_Block *block __attribute__((unused)),
+  const Heap_Block *block RTEMS_UNUSED,
   uintptr_t block_size,
   bool block_is_used,
   void *visitor_arg
diff --git a/cpukit/score/src/heapnoextend.c b/cpukit/score/src/heapnoextend.c
index 60f0f8d..d961c5a 100644
--- a/cpukit/score/src/heapnoextend.c
+++ b/cpukit/score/src/heapnoextend.c
@@ -27,10 +27,10 @@
 #include <rtems/score/heapimpl.h>
 
 uintptr_t _Heap_No_extend(
-  Heap_Control *unused_0 __attribute__((unused)),
-  void *unused_1 __attribute__((unused)),
-  uintptr_t unused_2 __attribute__((unused)),
-  uintptr_t unused_3 __attribute__((unused))
+  Heap_Control *unused_0 RTEMS_UNUSED,
+  void *unused_1 RTEMS_UNUSED,
+  uintptr_t unused_2 RTEMS_UNUSED,
+  uintptr_t unused_3 RTEMS_UNUSED
 )
 {
   return 0;
diff --git a/cpukit/score/src/threadqflush.c b/cpukit/score/src/threadqflush.c
index 530941b..8dca3f9 100644
--- a/cpukit/score/src/threadqflush.c
+++ b/cpukit/score/src/threadqflush.c
@@ -26,7 +26,7 @@ void _Thread_queue_Flush(
 #if defined(RTEMS_MULTIPROCESSING)
   Thread_queue_Flush_callout  remote_extract_callout,
 #else
-  Thread_queue_Flush_callout  remote_extract_callout __attribute__((unused)),
+  Thread_queue_Flush_callout  remote_extract_callout RTEMS_UNUSED,
 #endif
   uint32_t                    status
 )
diff --git a/testsuites/libtests/devfs04/test_driver.c b/testsuites/libtests/devfs04/test_driver.c
index 833fb65..bd4b40a 100644
--- a/testsuites/libtests/devfs04/test_driver.c
+++ b/testsuites/libtests/devfs04/test_driver.c
@@ -36,8 +36,8 @@ static char initialized;
  */
 rtems_device_driver testDriver_initialize(
   rtems_device_major_number major,
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   rtems_device_driver status;
@@ -73,9 +73,9 @@ rtems_device_driver testDriver_initialize(
  *    rval       - RTEMS_SUCCESSFUL
  */
 rtems_device_driver testDriver_open(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return RTEMS_SUCCESSFUL;
@@ -94,9 +94,9 @@ rtems_device_driver testDriver_open(
  *    rval       - RTEMS_SUCCESSFUL
  */
 rtems_device_driver testDriver_close(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return RTEMS_SUCCESSFUL;
@@ -115,8 +115,8 @@ rtems_device_driver testDriver_close(
  *    rval       - RTEMS_SUCCESSFUL
  */
 rtems_device_driver testDriver_read(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
   void *pargp
 )
 {
@@ -147,8 +147,8 @@ rtems_device_driver testDriver_read(
  *    rval       - RTEMS_SUCCESSFUL
  */
 rtems_device_driver testDriver_write(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
   void *pargp
 )
 {
@@ -180,9 +180,9 @@ rtems_device_driver testDriver_write(
  */
 
 rtems_device_driver testDriver_control(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return RTEMS_NOT_IMPLEMENTED;
diff --git a/testsuites/libtests/deviceio01/test_driver.c b/testsuites/libtests/deviceio01/test_driver.c
index b4d3ee6..0f80a27 100644
--- a/testsuites/libtests/deviceio01/test_driver.c
+++ b/testsuites/libtests/deviceio01/test_driver.c
@@ -35,8 +35,8 @@ static char initialized;
  */
 rtems_device_driver testDriver_initialize(
   rtems_device_major_number major,
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   rtems_device_driver status;
@@ -72,9 +72,9 @@ rtems_device_driver testDriver_initialize(
  *    rval       - RTEMS_SUCCESSFUL
  */
 rtems_device_driver testDriver_open(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return RTEMS_SUCCESSFUL;
@@ -93,9 +93,9 @@ rtems_device_driver testDriver_open(
  *    rval       - RTEMS_SUCCESSFUL
  */
 rtems_device_driver testDriver_close(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return RTEMS_SUCCESSFUL;
@@ -114,8 +114,8 @@ rtems_device_driver testDriver_close(
  *    rval       - RTEMS_SUCCESSFUL
  */
 rtems_device_driver testDriver_read(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
   void *pargp
 )
 {
@@ -146,8 +146,8 @@ rtems_device_driver testDriver_read(
  *    rval       - RTEMS_SUCCESSFUL
  */
 rtems_device_driver testDriver_write(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
   void *pargp
 )
 {
@@ -179,9 +179,9 @@ rtems_device_driver testDriver_write(
  */
 
 rtems_device_driver testDriver_control(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   return RTEMS_NOT_IMPLEMENTED;
diff --git a/testsuites/psxtests/psxconfig01/init.c b/testsuites/psxtests/psxconfig01/init.c
index 0a3de1b..b4c555e 100644
--- a/testsuites/psxtests/psxconfig01/init.c
+++ b/testsuites/psxtests/psxconfig01/init.c
@@ -218,18 +218,18 @@ static char *get_posix_name(char a, char b, char c, int i)
 }
 
 #if !defined(RTEMS_SMP)
-static void task_var_dtor(void *var __attribute__((unused)))
+static void task_var_dtor(void *var RTEMS_UNUSED)
 {
   /* Do nothing */
 }
 #endif
 
-static void *posix_thread(void *arg __attribute__((unused)))
+static void *posix_thread(void *arg RTEMS_UNUSED)
 {
   rtems_test_assert(0);
 }
 
-static void posix_key_dtor(void *key __attribute__((unused)))
+static void posix_key_dtor(void *key RTEMS_UNUSED)
 {
   /* Do nothing */
 }
diff --git a/testsuites/sptests/spfatal_support/consume_sems.c b/testsuites/sptests/spfatal_support/consume_sems.c
index 69c70d7..20fa1ee 100644
--- a/testsuites/sptests/spfatal_support/consume_sems.c
+++ b/testsuites/sptests/spfatal_support/consume_sems.c
@@ -15,18 +15,18 @@
 
 /* forward declarations to avoid warnings */
 rtems_device_driver consume_semaphores_initialize(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 );
 
 #define MAXIMUM 20
 rtems_id Semaphores[MAXIMUM];
 
 rtems_device_driver consume_semaphores_initialize(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 )
 {
   int               sems;
diff --git a/testsuites/sptests/spfatal_support/system.h b/testsuites/sptests/spfatal_support/system.h
index 39f6de6..19adb47 100644
--- a/testsuites/sptests/spfatal_support/system.h
+++ b/testsuites/sptests/spfatal_support/system.h
@@ -42,9 +42,9 @@ void force_error(void);
 /* need some prototypes for test cases */
 
 rtems_device_driver consume_semaphores_initialize(
-  rtems_device_major_number major __attribute__((unused)),
-  rtems_device_minor_number minor __attribute__((unused)),
-  void *pargp __attribute__((unused))
+  rtems_device_major_number major RTEMS_UNUSED,
+  rtems_device_minor_number minor RTEMS_UNUSED,
+  void *pargp RTEMS_UNUSED
 );
 
 #define CONSUME_SEMAPHORE_DRIVERS \
diff --git a/testsuites/tmtests/tmoverhd/dumrtems.h b/testsuites/tmtests/tmoverhd/dumrtems.h
index bbdb0aa..535d6a1 100644
--- a/testsuites/tmtests/tmoverhd/dumrtems.h
+++ b/testsuites/tmtests/tmoverhd/dumrtems.h
@@ -247,7 +247,7 @@
            Empty_directive()
 
 #if defined(__GNUC__)
-#define RTEMS_GCC_NOWARN_UNUSED	__attribute__((unused))
+#define RTEMS_GCC_NOWARN_UNUSED	RTEMS_UNUSED
 #else
 #define RTEMS_GCC_NOWARN_UNUSED
 #endif
-- 
1.8.4.5





More information about the devel mailing list