diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2010-06-11 23:38:25 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2010-06-11 23:38:25 +0000 |
commit | bc8e0a9a4b8c73d1e94123c04dc1d7d348595c67 (patch) | |
tree | 2845ce23ff2e883952c8d8c0f45bf0b887368240 /sys/sys/file.h | |
parent | 6701e403de244483feff70a678479c7d93538f10 (diff) | |
download | src-bc8e0a9a4b8c73d1e94123c04dc1d7d348595c67.tar.gz src-bc8e0a9a4b8c73d1e94123c04dc1d7d348595c67.zip |
Apply band-aid around function-like macro fdrop() without turning it into
a real (inline) function or applying void casting for all its consumers.
In most of places, the "return value" is not checked nor assigned, which
causes too many warnings for some smart compilers, i.e., clang.
Found by: clang
Notes
Notes:
svn path=/head/; revision=209082
Diffstat (limited to 'sys/sys/file.h')
-rw-r--r-- | sys/sys/file.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/sys/file.h b/sys/sys/file.h index 8ad30a5aee73..061ce02d413b 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -201,10 +201,17 @@ int fgetvp_write(struct thread *td, int fd, struct vnode **vpp); int fgetsock(struct thread *td, int fd, struct socket **spp, u_int *fflagp); void fputsock(struct socket *sp); +static __inline int +_fnoop(void) +{ + + return (0); +} + #define fhold(fp) \ (refcount_acquire(&(fp)->f_count)) #define fdrop(fp, td) \ - (refcount_release(&(fp)->f_count) ? _fdrop((fp), (td)) : 0) + (refcount_release(&(fp)->f_count) ? _fdrop((fp), (td)) : _fnoop()) static __inline fo_rdwr_t fo_read; static __inline fo_rdwr_t fo_write; |