From nobody@FreeBSD.org  Sat Dec  1 05:12:43 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E7D1985C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Dec 2012 05:12:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id CFCED8FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Dec 2012 05:12:32 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qB15CWqG036668
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 1 Dec 2012 05:12:32 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qB15CWT0036667;
	Sat, 1 Dec 2012 05:12:32 GMT
	(envelope-from nobody)
Message-Id: <201212010512.qB15CWT0036667@red.freebsd.org>
Date: Sat, 1 Dec 2012 05:12:32 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch][mthca] Fix compilation with non-clang compiler
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174027
>Category:       kern
>Synopsis:       [patch][mthca] Fix compilation with non-clang compiler
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 01 05:20:00 UTC 2012
>Closed-Date:    Sat Dec 01 19:35:55 UTC 2012
>Last-Modified:  Sun Feb 03 22:31:32 UTC 2013
>Originator:     Garrett Cooper
>Release:        9.1-STABLE
>Organization:
EMC Isilon
>Environment:
FreeBSD bayonetta.local 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0 r240836M: Sat Sep 22 12:30:11 PDT 2012     gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA  amd64
>Description:
I build on my host system with WITHOUT_CLANG, and I ran into some problems with
pc98's LINT target on my workstation.
>How-To-Repeat:
make tinderbox -DMAKE_JUST_KERNELS -DWITHOUT_CLANG TARGETS=pc98
>Fix:


Patch attached with submission follows:

Index: sys/modules/mthca/Makefile
===================================================================
--- sys/modules/mthca/Makefile	(revision 242903)
+++ sys/modules/mthca/Makefile	(working copy)
@@ -28,4 +28,4 @@
 
 .include <bsd.kmod.mk>
 
-CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions  -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides
+CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions  -Wno-switch ${NO_WSOMETIMES_UNINITIALIZED} -Wno-conversion ${NO_WINITIALIZER_OVERRIDES}
Index: sys/conf/kern.mk
===================================================================
--- sys/conf/kern.mk	(revision 242903)
+++ sys/conf/kern.mk	(working copy)
@@ -25,6 +25,7 @@
 NO_WFORMAT_SECURITY=		-Wno-format-security
 NO_WUNNEEDED_INTERNAL_DECL=	-Wno-unneeded-internal-declaration
 NO_WSOMETIMES_UNINITIALIZED=	-Wno-error-sometimes-uninitialized
+NO_WINITIALIZER_OVERRIDES=	-Wno-initializer-overrides
 # Several other warnings which might be useful in some cases, but not severe
 # enough to error out the whole kernel build.  Display them anyway, so there is
 # some incentive to fix them eventually.


>Release-Note:
>Audit-Trail:
Date: Sat, 1 Dec 2012 11:33:00 -0800
From: Garrett Cooper <yaneurabeya@gmail.com>
To: Dimitry Andric <dim@freebsd.org>
Subject: Re: Fwd: kern/174027: [patch][mthca] Fix compilation with non-clang compiler

 On Sat, Dec 1, 2012 at 5:06 AM, Dimitry Andric <dim@freebsd.org> wrote:
 
 ...
 
 > I removed the workaround flags that Xin added, and which were
 > clang-only, e.g.: -Wno-switch -Wno-sometimes-uninitialized
 > -Wno-conversion -Wno-initializer-overrides
 >
 > I simply fixed the actual warnings. :)
 
     Sorry. I realized that the tree I was working with was stale;
 after I svn up'ed it the commit was integrated into my workspace.
 Thanks!
 -Garrett

State-Changed-From-To: open->closed 
State-Changed-By: tj 
State-Changed-When: Sat Dec 1 19:35:54 UTC 2012 
State-Changed-Why:  
Fixed on HEAD, closed at the request of the originator. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174027 
>Unformatted:
