summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-10-16 08:21:48 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-10-26 09:13:19 +0100
commitf97536dcd310a1a15426dcd411d55367019879fc (patch)
treed37a1e12bac98a4df4a2dd70d5de3ee99f23d821 /cpukit/libcsupport
parentbasdefs.h: Add and use RTEMS_DEPRECATED (diff)
downloadrtems-f97536dcd310a1a15426dcd411d55367019879fc.tar.bz2
basdefs.h: Add and use RTEMS_UNUSED
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r--cpukit/libcsupport/src/__gettod.c4
-rw-r--r--cpukit/libcsupport/src/__times.c2
-rw-r--r--cpukit/libcsupport/src/_calloc_r.c3
-rw-r--r--cpukit/libcsupport/src/_free_r.c3
-rw-r--r--cpukit/libcsupport/src/_malloc_r.c3
-rw-r--r--cpukit/libcsupport/src/_realloc_r.c3
-rw-r--r--cpukit/libcsupport/src/_rename_r.c2
-rw-r--r--cpukit/libcsupport/src/assocnamebad.c2
-rw-r--r--cpukit/libcsupport/src/close.c2
-rw-r--r--cpukit/libcsupport/src/envlock.c4
-rw-r--r--cpukit/libcsupport/src/fcntl.c2
-rw-r--r--cpukit/libcsupport/src/flockfile.c3
-rw-r--r--cpukit/libcsupport/src/fstat.c2
-rw-r--r--cpukit/libcsupport/src/ftrylockfile.c3
-rw-r--r--cpukit/libcsupport/src/funlockfile.c3
-rw-r--r--cpukit/libcsupport/src/getpid.c2
-rw-r--r--cpukit/libcsupport/src/isatty_r.c3
-rw-r--r--cpukit/libcsupport/src/link.c2
-rw-r--r--cpukit/libcsupport/src/lseek.c2
-rw-r--r--cpukit/libcsupport/src/newlibc_reent.c2
-rw-r--r--cpukit/libcsupport/src/open.c2
-rw-r--r--cpukit/libcsupport/src/printk_plugin.c4
-rw-r--r--cpukit/libcsupport/src/read.c2
-rw-r--r--cpukit/libcsupport/src/rtems_heap_null_extend.c4
-rw-r--r--cpukit/libcsupport/src/setpgid.c6
-rw-r--r--cpukit/libcsupport/src/stat.c4
-rw-r--r--cpukit/libcsupport/src/tcflow.c4
-rw-r--r--cpukit/libcsupport/src/tcgetpgrp.c3
-rw-r--r--cpukit/libcsupport/src/tcsendbreak.c4
-rw-r--r--cpukit/libcsupport/src/tcsetpgrp.c4
-rw-r--r--cpukit/libcsupport/src/unlink.c2
-rw-r--r--cpukit/libcsupport/src/write_r.c2
32 files changed, 54 insertions, 39 deletions
diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c
index b0b60de367..578369b4c3 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 e5ec411543..ea6d1c65a7 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 11dd49b73f..58e6a5cba1 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 b8a654e6bc..3bd6025958 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 0af41003f5..311f6d1669 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 06743c51a2..32880802d4 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 e097a5e309..6f31088278 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 7977f88949..33691419fb 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 c6d4e8fd59..139ffd266a 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 bc6f02c9f7..48cb2e0f1b 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 ddaf447060..e7b6b23479 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 b4c28d8ce5..511badd219 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 51c8f031e6..8b39c438f4 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 54d5419c60..bc567e49a7 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 46e8af33bb..bf409da8a3 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 b2cd19b999..53ab2f4dc8 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 89df9a745a..a23417245c 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 3bec15e6aa..faea544e29 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 60c391f680..f5c6fa6226 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 430157cf0f..bf8847ce13 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 4fb2ea2d93..62ce507284 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 9d9f3de379..b600378d0a 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 10b4e4e24a..a5df6a1140 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 d36e00bbe3..329956cbf5 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 f3251bcacd..dd810d7559 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 7a48f40e5a..f5b72fa282 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 50763efcb2..710289c7df 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 5bbf9c67b8..61585b1826 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 3b2bfa8da7..0f2e15c5fa 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 bb459757f8..f0bbb1d0d0 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 de7c71228f..84b7994a87 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 d3b8685bd9..12dabc9591 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