svn commit: r209082 - head/sys/sys
Jung-uk Kim
jkim at FreeBSD.org
Fri Jun 11 23:38:25 UTC 2010
Author: jkim
Date: Fri Jun 11 23:38:25 2010
New Revision: 209082
URL: http://svn.freebsd.org/changeset/base/209082
Log:
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
Modified:
head/sys/sys/file.h
Modified: head/sys/sys/file.h
==============================================================================
--- head/sys/sys/file.h Fri Jun 11 22:59:47 2010 (r209081)
+++ head/sys/sys/file.h Fri Jun 11 23:38:25 2010 (r209082)
@@ -201,10 +201,17 @@ int fgetvp_write(struct thread *td, int
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;
More information about the svn-src-head
mailing list