diff options
author | Cong <congusbongus@gmail.com> | 2016-03-12 14:20:17 +0300 |
---|---|---|
committer | Cong <congusbongus@gmail.com> | 2016-03-12 14:20:17 +0300 |
commit | 9ab8232afece6e3600ecd9337d9d2b82b1f062bf (patch) | |
tree | 4ff0727bc34888f9c443bb8d973d10447be5c03a | |
parent | 31aecd9277ea411062bdf4d503211c573e65af30 (diff) |
Replace unused macro
-rwxr-xr-x | tinydir.h | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -73,17 +73,6 @@ extern "C" { #define _TINYDIR_FREE(_ptr) free(_ptr) #endif /* !defined(_TINYDIR_MALLOC) */ -/* avoid warnings due to unused variables or parameters */ -#ifndef _MSC_VER - #if !defined(_TINYDIR_UNUSED) - #ifdef __GNUC__ - #define _TINYDIR_UNUSED(x) _TINYDIR_UNUSED_ ## x __attribute__((__unused__)) - #else - #define _TINYDIR_UNUSED(x) _TINYDIR_UNUSED_ ## x - #endif - #endif -#endif - #ifndef _MSC_VER /* The following authored by Ben Hutchings <ben@decadent.org.uk> @@ -100,11 +89,12 @@ extern "C" { * If you use autoconf, include fpathconf and dirfd in your * * AC_CHECK_FUNCS list. Otherwise use some other method to detect * * and use them where available. */ - -static size_t dirent_buf_size(DIR * _TINYDIR_UNUSED(dirp)) +static size_t dirent_buf_size(DIR *dirp) { long name_max; size_t name_end; + /* parameter may be unused */ + (void)dirp; # if defined(HAVE_FPATHCONF) && defined(HAVE_DIRFD) \ && defined(_PC_NAME_MAX) |