diff options
author | Vikas Gorur <vikas@gluster.com> | 2011-03-17 19:01:02 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-22 04:02:23 -0700 |
commit | 9c7bc4f5da67a630fe543bd8bdf5d1aaf2acef99 (patch) | |
tree | 8493f1f8fc488033a3ecbf0372824f3722a423dd /libglusterfs | |
parent | c077bd932beff169a366c99c94ff45e432d1d793 (diff) |
libglusterfs/compat.h: Fix build warning in dirent_size().
Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2550 (build warnings)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2550
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/compat.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h index 059f67131..a6f1f01bd 100644 --- a/libglusterfs/src/compat.h +++ b/libglusterfs/src/compat.h @@ -319,18 +319,21 @@ size_t strnlen(const char *string, size_t maxlen); static inline int32_t dirent_size (struct dirent *entry) { + int32_t size = -1; + #ifdef GF_BSD_HOST_OS - return GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_namlen); + size = GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_namlen); #endif #ifdef GF_DARWIN_HOST_OS - return GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_namlen); + size = GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_namlen); #endif #ifdef GF_LINUX_HOST_OS - return GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_reclen); + size = GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_reclen); #endif #ifdef GF_SOLARIS_HOST_OS - return GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_reclen); + size = GF_DIR_ALIGN (24 /* FIX MEEEE!!! */ + entry->d_reclen); #endif + return size; } |