From 118e010f3fb0512776a28569b42ef66e6d6b3a8f Mon Sep 17 00:00:00 2001 From: Ron Yorston <rmy@pobox.com> Date: Wed, 23 Aug 2017 11:49:24 +0100 Subject: inode_hash: avoid warnings about unused parameters --- include/libbb.h | 2 ++ include/mingw.h | 1 + libbb/inode_hash.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/libbb.h b/include/libbb.h index c95f43954..2b349ed12 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1626,7 +1626,9 @@ int bb_xioctl(int fd, unsigned request, void *argp) FAST_FUNC; #endif char *is_in_ino_dev_hashtable(const struct stat *statbuf) FAST_FUNC; +#if !ENABLE_PLATFORM_MINGW32 void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) FAST_FUNC; +#endif void reset_ino_dev_hashtable(void) FAST_FUNC; #ifdef __GLIBC__ /* At least glibc has horrendously large inline for this, so wrap it */ diff --git a/include/mingw.h b/include/mingw.h index 08d36cb49..65cccab21 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -470,6 +470,7 @@ const char * next_path_sep(const char *path); #define is_absolute_path(path) ((path)[0] == '/' || (path)[0] == '\\' || has_dos_drive_prefix(path)) #define find_mount_point(n, s) find_mount_point(n) +#define add_to_ino_dev_hashtable(s, n) (void)0 /* * helpers diff --git a/libbb/inode_hash.c b/libbb/inode_hash.c index 64f43b885..bfed6567c 100644 --- a/libbb/inode_hash.c +++ b/libbb/inode_hash.c @@ -56,10 +56,10 @@ char* FAST_FUNC is_in_ino_dev_hashtable(const struct stat *statbuf) return NULL; } +#if !ENABLE_PLATFORM_MINGW32 /* Add statbuf to statbuf hash table */ void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) { -#if !ENABLE_PLATFORM_MINGW32 int i; ino_dev_hashtable_bucket_t *bucket; @@ -77,8 +77,8 @@ void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char * i = hash_inode(statbuf->st_ino); bucket->next = ino_dev_hashtable[i]; ino_dev_hashtable[i] = bucket; -#endif } +#endif #if ENABLE_DU || ENABLE_FEATURE_CLEAN_UP /* Clear statbuf hash table */ -- cgit v1.2.3-55-g6feb