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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to