From owner-svn-src-head@freebsd.org Mon Feb 22 10:15:10 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 DBFAEAAF6C5; Mon, 22 Feb 2016 10:15:09 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pf0-x236.google.com (mail-pf0-x236.google.com [IPv6:2607:f8b0:400e:c00::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8ED81211; Mon, 22 Feb 2016 10:15:09 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pf0-x236.google.com with SMTP id q63so90462047pfb.0; Mon, 22 Feb 2016 02:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=x51s0mbk73kv42NYraWeOP+nu4LexG7jtqJAR5S4dLY=; b=UbJpJuA+6WGtS5+5qZwG1Kjf8UI0neCdJjC94o4MIhsi+KsN9y7U2O8cj/AYiHPfAr MCsZqUTddOKlI3bfLSRRK1gS/vrXGx06ErVQ74Idcx+g/EARTW+oVJFYyIxqqMX9H/DV z6mmD/ZfF8kDKGIqTeMMLwrH1Fdoo/F48eCxEkGPoVwhZOn35i/pry0mRavCX5TyMEdt m/e2IP6YyC9f+yA/ZLjqEpO8Yo+2FAU4oM5LjN1JB9VzbV4okJbSMSJg8oWw4SCX1T/v oEb8y89sV1WoCqp6o/9/McwA4lWk1SoYbGgoZ1TReRMvjDp9Vym2+ewrBQVOYCaQb+tl ET+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:reply-to:subject:references:to:cc:from :message-id:date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=x51s0mbk73kv42NYraWeOP+nu4LexG7jtqJAR5S4dLY=; b=hw+l2EtyEctDUL7cosDoc3LHJH+Hk6KpfQQUwUddL7bhsF+aSTP1Zc+f3VHocmCmOx bZ1bpEEw96Jl7gmHwW4EXQ8xm1SakQM10zRrAgF548ilePt/HNsWYq9TfNNOMNz8ijHJ NSzKmQJpaIRJBnM2ruJv6jf+oFLWw36PyzFEBUv2sMLuV9sII37RkizZv9tgpCe/OYq4 j7sDw7z69iRfbplHZ+E1nwmIdYkSNETI2KSsaLX4hVKbdXAhXexgVavF69xBFKYmr1qb eeuFHn4urjXyeYZXcc/AnoA6+tOKGFyF388kQIafWGWAj/PTtTKxp3npl5k9M0IlaD1q wqaA== X-Gm-Message-State: AG10YORP1jCbxy9XlWA3qAfwuRTF0GqSNaLGvYnyKkkJ/tgCv1ccPEXW5Z9R+59x4Lfozw== X-Received: by 10.98.87.80 with SMTP id l77mr36911718pfb.101.1456136109171; Mon, 22 Feb 2016 02:15:09 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:1822:a961:f0af:d233? (2001-44b8-31ae-7b01-1822-a961-f0af-d233.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:1822:a961:f0af:d233]) by smtp.gmail.com with ESMTPSA id s90sm35624027pfa.49.2016.02.22.02.15.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Feb 2016 02:15:08 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r295768 - head/usr.sbin/iostat References: <201602182008.u1IK81vg092127@repo.freebsd.org> <83BB8467-4C40-4CF1-B394-1376C9D97FCF@FreeBSD.org> <156A6796-D62B-4977-893B-E4E727578412@FreeBSD.org> To: David Chisnall , Dimitry Andric Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Sergey Kandaurov , "src-committers@freebsd.org" , Alan Somers From: Kubilay Kocak X-Enigmail-Draft-Status: N1110 Message-ID: Date: Mon, 22 Feb 2016 21:15:01 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <156A6796-D62B-4977-893B-E4E727578412@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: Mon, 22 Feb 2016 10:15:10 -0000 On 22/02/2016 8:56 PM, David Chisnall wrote: > On 19 Feb 2016, at 23:23, Dimitry Andric wrote: >> >> This warning is only produced when you use -Wall -W, and then >> initialize structs partially, i.e. you initialize some fields but >> not others. I think this is a quite reasonable warning for a high >> warning level. > > The warning is annoying in many ways. You ought to be able to zero > initialise any struct with {0}, but clang objects if you do this and > requires every field to be filled in. This warning really shouldn’t > be enabled with -Wall, because it has too hight a false positive > rate. For the lay persons among us (I'm genuinely interested), what are the the downsides to requiring initialization of all fields? And in addition, the upsides, if any, of 'deferred' field initialization? Is there a proper term for the above? > With regard to Bruce’s comment about padding, this is a known issue > in C11. There is an open DR about it and it’s scheduled for > discussion at the WG14 meeting in London in April. > > David > Koobs