Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cxong/tinydir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCong <congusbongus@gmail.com>2016-03-12 14:20:17 +0300
committerCong <congusbongus@gmail.com>2016-03-12 14:20:17 +0300
commit9ab8232afece6e3600ecd9337d9d2b82b1f062bf (patch)
tree4ff0727bc34888f9c443bb8d973d10447be5c03a
parent31aecd9277ea411062bdf4d503211c573e65af30 (diff)
Replace unused macro
-rwxr-xr-xtinydir.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/tinydir.h b/tinydir.h
index 5590fe8..cc8c875 100755
--- a/tinydir.h
+++ b/tinydir.h
@@ -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)