From owner-svn-src-head@FreeBSD.ORG Fri Jun 11 23:38:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE9AA1065674; Fri, 11 Jun 2010 23:38:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD94D8FC14; Fri, 11 Jun 2010 23:38:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5BNcPrB024560; Fri, 11 Jun 2010 23:38:25 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5BNcPC3024558; Fri, 11 Jun 2010 23:38:25 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201006112338.o5BNcPC3024558@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 11 Jun 2010 23:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209082 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 23:38:25 -0000 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;