From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3597 Path: news.gmane.org!not-for-mail From: Nathan McSween Newsgroups: gmane.linux.lib.musl.general Subject: Re: endian.h warnings Date: Tue, 09 Jul 2013 19:29:12 -0700 Message-ID: <51DCC6F8.50804@gmail.com> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1373423378 3115 80.91.229.3 (10 Jul 2013 02:29:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jul 2013 02:29:38 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3601-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 10 04:29:40 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Uwk9t-0007uj-3I for gllmg-musl@plane.gmane.org; Wed, 10 Jul 2013 04:29:33 +0200 Original-Received: (qmail 24008 invoked by uid 550); 10 Jul 2013 02:29:32 -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 23997 invoked from network); 10 Jul 2013 02:29:32 -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=JOD4likM8Om9G1kuARFLwYiFeNLTd7tQQTHH66QqOy4=; b=enbBIkxrIHD+ViisQhZdZ7bRIFaeTPl69A/NWTPdb5nMvMPyAKQcSaSU3Qexg4XeH7 Fjhal7JB0Scc8JM26wJ4Iy38I+KL1nti1E2Iai/cJbK+XODqcWPsoH+ag7nSp0M+iVi+ Pvzy4747jHvTg2nFYnigD8V+03XuHRhXNL/a8P/aXoJn9WLQInRT2o8DAEeAtwHS/b6n S61BCO4DLh15f93NggHIdvnKd+R3bvwwqIjuQew3FJgp8nN/CmGeCoHoFiZ/6W+vHEZx dYR7YO/Sr1Ei0QzqPAlI6FyQgOQAg+ywsuiv3XwqJ1COpjTlYr/bFBWdJ53UxPBqaaOY SJgQ== X-Received: by 10.66.246.194 with SMTP id xy2mr26230499pac.131.1373423360279; Tue, 09 Jul 2013 19:29:20 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:3597 Archived-At: On Tuesday, July 09, 2013 7:21:58 PM, Andre Renaud wrote: > Hi, > When using musl with -Wparentheses enabled, I get the following warnings: > ../include/endian.h: In function '__bswap32': > ../include/endian.h:32:2: warning: suggest parentheses around > arithmetic in operand of '|' [-Wparentheses] > ../include/endian.h:32:2: warning: suggest parentheses around > arithmetic in operand of '|' [-Wparentheses] > ../include/endian.h: In function '__bswap64': > ../include/endian.h:37:2: warning: suggest parentheses around '+' > inside '<<' [-Wparentheses] > > I appreciate that these aren't bugs, and are just gcc being over > enthusiastic in it's warnings (which I've asked it to be on the > command line), however would it be worth sticking some parentheses > into the code simply to avoid this kind of noise being visible for > users? > > Regards, > Andres Try with -Wall -Wextra -Wpedantic. GCC will spam warnings for nearly anything, struct padding warnings are extremely annoying. Somewhat (maybe?) concerning warnings are signed / unsigned comparisons in math/*