From owner-svn-src-head@freebsd.org Thu May 24 16:30:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA0FBEF74E4 for ; Thu, 24 May 2018 16:30:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic306-21.consmr.mail.ne1.yahoo.com (sonic306-21.consmr.mail.ne1.yahoo.com [66.163.189.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CC2D765AE for ; Thu, 24 May 2018 16:30:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1527179434; bh=F5zM+p9uCG7nAQo4kw4VL7I2ZVNMggPUSPrn8RuCVV4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=sK+10s/wTDPd9EkfSWaNg5fLaPyDoi5MJiP4pBOJuDLMe6ulI+dJ2wVBkU93z36yhkymW9S8eMMub325A+EBr6dcXGMRH1Yg/P3oHO2DjXM7RTHrygNeJJBU9x6EF/A7g97Y2aQXcsU1OYOE3aZOZgdjT1Kp/7pbhQspobz4QDAsNbyfeWgpHZRUChmVv0ySl6GQDtSngaHKYe9r1gC0mutjtYjs54XIdWnKJo2aInsTwhn1QjH3k9jZL6NOmfAqLE95N3I0r/z1UppQCJmCqmn5foTIQ72Vmp3GsvXCvL1PJ1Vno31IGj4utaygw7ZGonl+qac4IigG7cQrTrmJCA== X-YMail-OSG: 0xTXRQkVM1kgvOG0AEJzi.79vlg6wfQqIV3jRhmqLzK9OW0RBLgtukpFZ2oZJUD dBHreYovoWh.MLAhkUNvgcnia0rGUjR1sLTl810QWPmaRg1QB.yQNxv8yAIwpUGom.tSghMyH1fq 7CPLAi_0fdfsvu7zgXhJIwOEankaOSs7onHlCuvRCXTMZdU3iFWUTX2Du5rN.G8kmoWI11OBA_kj 26fiXQWkkz1CtixZyHN2r3yjduaACT4xGG6AsAKlzMRSlQy_BrQyDg0CO8nNyTYRCDZB5YWV17kc _KmfN2D8.nqLh.Wls0RbLCjBH3ax3JEzaiC0TV95qZYKyagaiwQhm2fGg2Nqq_V9aKoFcQMW2iA9 mYAQe9rT6fdJqPYKylF8CyGt3Ja9I8Z2Gq4sSiYsaaXhkemrka0TvkaqlPGNDfxtOgNAiuJRB7Yt ci4w5XvTg1WilvWEhHZ9oaiSYI7NNi.7tGAY_39UzvWbsQEA6V_2EplIBh_E2iNTxnu.m2kHMNmO lSsT7ExslPavcTVSsyDt5u0fi2TLeI7X4lAurhkq1RLV5mv54jpHa_EwMP4Nk0I4IYIfgINohJA. q3rnILNcUSECHSlvwddVL5AzS2A5wEMLoZpxdbFOQ02OBEszlpBudZRjOmAWQqj5QTOe_cXYz_E3 nnm6h5s0wdobEHaCQsBo- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Thu, 24 May 2018 16:30:34 +0000 Received: from 181.52.72.201 (EHLO [192.168.0.6]) ([181.52.72.201]) by smtp412.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b6d68994c9fa2ddef0bc4fa91c81ef24; Thu, 24 May 2018 16:30:30 +0000 (UTC) Subject: Re: svn commit: r333860 - head/sys/kern To: Matthew Macy , Warner Losh Cc: Michael Tuexen , Gleb Smirnoff , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805190510.w4J5AqfS054367@repo.freebsd.org> <20180523222743.GU71675@FreeBSD.org> <20180523225729.GV71675@FreeBSD.org> <20180524044252.GW71675@FreeBSD.org> <5B9EE208-384F-44AD-9B47-059D77FE9B34@macmic.franken.de> From: Pedro Giffuni Message-ID: <9b7c8c0f-4c33-1a14-f0db-5370c3e5def7@FreeBSD.org> Date: Thu, 24 May 2018 11:30:37 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 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: Thu, 24 May 2018 16:30:44 -0000 On 05/24/18 11:00, Matthew Macy wrote: > On Thu, May 24, 2018 at 8:58 AM, Warner Losh wrote: >> >> On Thu, May 24, 2018 at 12:53 AM, Matthew Macy wrote: >>> On Wed, May 23, 2018 at 11:42 PM, Michael Tuexen >>> wrote: >>>>> On 24. May 2018, at 08:36, Matthew Macy wrote: >>>>> >>>>> On Wed, May 23, 2018 at 11:35 PM, Michael Tuexen >>>>> wrote: >>>>>>> On 24. May 2018, at 06:51, Matthew Macy wrote: >>>>>>> >>>>>>> Warnings find bugs PERIOD. Although most are not useful, I've found >>>>>> Some warnings indicate bugs, some warnings are just wrong. If you >>>>>> have a "may be used uninitialized" warning being a false positive, you >>>>>> may silences the warning by just set it to zero in the declaration and >>>>>> you silence it. Other compilers might then correctly report an >>>>>> assignment without affect... >>>>> I have yet to see a double assignment be flagged as assignment without >>>>> effect. If it _does_ occur then we have to disable the warning on the >>>>> compiler that we have less faith in. >>>> Have seen it in the past in a difference project... But you miss my >>>> point: >>>> >>>> Not all warnings indicate bugs PERIOD. Some warning are just wrong... >>> Have you read my follow up? _Many_ Many warnings are wrong. Please >>> respond to that on what the global policy should be. The value of any >>> one particular instance of a warning does not merit discussion. >> >> The global policy has never been 'fix all warnings no matter what.' It's >> been 'Look at the warning. If it's a false positive, use judgement about >> whether or not to stifle the compiler.' There are cases I've run into that >> it was impossible to silence the warnings (apart form adding command line >> stuff) for a particular bit of code. Do it one way gcc 4.2 complains. Do it >> another clang complains. appease both and gcc 6 had heart-burn. >> >> So don't gratuitously commit code that fixes warnings on gcc 8. If the >> warning points out a legitimate bug, then that's no brainer yes. If it's a >> false positive, then it's less clear and often times many factors may need >> to be weighed. > Non-actionable warnings are actively detrimental to workflow. They > hide real issues and lead to apathy by developers. If pacifying a > warning is considered undesirable it should be disabled by default > with perhaps a separate mode for enabling it. False positives are compiler bugs. It does happen, with GCC more than with clang, that the compiler has too many bugs and it's a bad practice to pessimize code to work around them.  At very least you should add a comment when adding unnecessary initializations, something like /* workaround GCC */, but dropping broken warnings is best. Pedro.