From owner-svn-src-head@freebsd.org Fri Feb 19 23:32:54 2016 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 B3C3FAAD3DD; Fri, 19 Feb 2016 23:32:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D87612FE; Fri, 19 Feb 2016 23:32:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u1JNWrTJ014787 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 19 Feb 2016 15:32:54 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u1JNWrRN014786; Fri, 19 Feb 2016 15:32:53 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 19 Feb 2016 15:32:53 -0800 From: Gleb Smirnoff To: Dimitry Andric Cc: Alan Somers , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Sergey Kandaurov , "src-committers@freebsd.org" Subject: Re: svn commit: r295768 - head/usr.sbin/iostat Message-ID: <20160219233253.GU1945@FreeBSD.org> References: <201602182008.u1IK81vg092127@repo.freebsd.org> <83BB8467-4C40-4CF1-B394-1376C9D97FCF@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83BB8467-4C40-4CF1-B394-1376C9D97FCF@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Feb 2016 23:32:54 -0000 On Sat, Feb 20, 2016 at 12:23:40AM +0100, Dimitry Andric wrote: D> You got this warning, most likely: D> D> usr.sbin/iostat/iostat.c:122:15: error: missing field 'n_type' initializer [-Werror,-Wmissing-field-initializers] D> { "_tty_nin" }, D> ^ D> D> This warning is only produced when you use -Wall -W, and then initialize D> structs partially, i.e. you initialize some fields but not others. I D> think this is a quite reasonable warning for a high warning level. D> D> On the other hand, if this kind of construct is used throughout the D> tree, and it is not seen as a big problem, we can simply silence this D> particular warning using -Wno-missing-field -initializers. There is D> already quite a list of warnings which are suppressed by default, even D> at WARNS=6, namely: D> D> -Wno-empty-body D> -Wno-format-y2k D> -Wno-pointer-sign D> -Wno-string-plus-int D> -Wno-unused-const-variable D> -Wno-unused-parameter I think we should add -Wno-missing-field-initializers there. We use this feature in the kernel intentionally, since it allows to write code that is less dependant on API changes. -- Totus tuus, Glebius.