From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7805 Path: news.gmane.org!not-for-mail From: Alex Dowad Newsgroups: gmane.linux.lib.musl.general Subject: Re: More on warning cleanup Date: Thu, 28 May 2015 08:55:24 +0200 Message-ID: <5566BBDC.5080805@gmail.com> References: <20150528050853.GA8590@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1432796148 25207 80.91.229.3 (28 May 2015 06:55:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 May 2015 06:55:48 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7817-gllmg-musl=m.gmane.org@lists.openwall.com Thu May 28 08:55:43 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YxrjC-00004t-4g for gllmg-musl@m.gmane.org; Thu, 28 May 2015 08:55:42 +0200 Original-Received: (qmail 32503 invoked by uid 550); 28 May 2015 06:55:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32485 invoked from network); 28 May 2015 06:55:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=jes234BkbS4pXs4ZIJ5gKFH7qwCxsaIBn6zxgn6NycI=; b=qXl6f7fcfuB33t7sIFbCqIR2sfLOkjXZvq6l1vhDK4kLx4NC+Xdo3sTd1b1eIXTWMX LryXIIVwmGEiPXKTmOWT5L1ElBTGJTeRNRW7V09BmQiLxddsOLvbwdW4YtfMNsmUtUjN QzIR0CaC2XaDmGZdEwh5EE0ywh/EyM29b4k/ghfLQApOtqg3PV4hCqmhgJy4gfrLqV+t QG9am7Tac62utdB8FdVQKNMD2x1NffzvOCB7k372cOJ8VjTVSDZD1CkJtuLjwQloLwIl WiMH6tq8faE5wp4CJHnU7s1jy4/UtLduBReUG0M9pTQlvKAgZcJnu+a+LWSdBBkeejDQ +1oA== X-Received: by 10.194.79.73 with SMTP id h9mr2326136wjx.125.1432796129124; Wed, 27 May 2015 23:55:29 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: <20150528050853.GA8590@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:7805 Archived-At: On 28/05/15 07:08, Rich Felker wrote: > Since compilers differ in what warnings they include in -Wall, I'd > like to remove -Wall (followed by a bunch of -Wno-*) from musl's > --enable-warnings and instead individually turn on the warnings we > want. A few weeks ago I worked those out on #musl (based on the GCC > manual's documentation of -Wall and other options) and here's what I > came up with: > > -Waddress > -Warray-bounds > -Wchar-subscripts > -Wreturn-type > -Wsequence-point > -Wstrict-aliasing > -Wstrict-overflow > -Wunused-function > -Wunused-variable > -Wunused-label > > This list does not include the ones we already have as errors because > they only trigger on invalid C: > > -Werror=implicit-function-declaration > -Werror=implicit-int > -Werror=pointer-sign > -Werror=pointer-arith > > Are these any other warnings we should enable? Are you interested in warnings provided by clang, but not by gcc? I've noticed that there are a few things in musl which clang warns about, but gcc doesn't; such as expressions where operator precedence might be confusing to some, and indexing into strings using + (it wants you to use [] instead).