From owner-svn-src-head@freebsd.org Sat Jul 22 21:29:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7546DDADB4B; Sat, 22 Jul 2017 21:29:45 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4115866098; Sat, 22 Jul 2017 21:29:45 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6MLTi1E024386; Sat, 22 Jul 2017 21:29:44 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6MLTiLt024385; Sat, 22 Jul 2017 21:29:44 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201707222129.v6MLTiLt024385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Sat, 22 Jul 2017 21:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321376 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 321376 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 22 Jul 2017 21:29:45 -0000 Author: rlibby Date: Sat Jul 22 21:29:44 2017 New Revision: 321376 URL: https://svnweb.freebsd.org/changeset/base/321376 Log: linuxkpi compiler.h: avoid gcc -Wunused-value in dummy expressions It looks like the __acquire and __release macros are for the consumption of static analysis tools and have no semantic effect. Transform the definitions from constant expressions to empty statements in order to avoid -Wunused-value from gcc. Likewise avoid future warnings for __chk_{user,io}_ptr, but with a cast to void, because it looks like some linux kernel code may use those in expression contexts. Reviewed by: hselasky, markj Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11695 Modified: head/sys/compat/linuxkpi/common/include/linux/compiler.h Modified: head/sys/compat/linuxkpi/common/include/linux/compiler.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/compiler.h Sat Jul 22 17:49:18 2017 (r321375) +++ head/sys/compat/linuxkpi/common/include/linux/compiler.h Sat Jul 22 21:29:44 2017 (r321376) @@ -40,13 +40,13 @@ #define __force #define __nocast #define __iomem -#define __chk_user_ptr(x) 0 -#define __chk_io_ptr(x) 0 +#define __chk_user_ptr(x) ((void)0) +#define __chk_io_ptr(x) ((void)0) #define __builtin_warning(x, y...) (1) #define __acquires(x) #define __releases(x) -#define __acquire(x) 0 -#define __release(x) 0 +#define __acquire(x) do { } while (0) +#define __release(x) do { } while (0) #define __cond_lock(x,c) (c) #define __bitwise #define __devinitdata