From owner-freebsd-questions@FreeBSD.ORG Fri Jun 13 16:11:25 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26D3CABA for ; Fri, 13 Jun 2014 16:11:25 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DECB42B23 for ; Fri, 13 Jun 2014 16:11:24 +0000 (UTC) Received: from r56.edvax.de (port-92-195-64-166.dynamic.qsc.de [92.195.64.166]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id EEBE227616; Fri, 13 Jun 2014 18:11:15 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s5DGBFvC001971; Fri, 13 Jun 2014 18:11:15 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 13 Jun 2014 18:11:15 +0200 From: Polytropon To: Rick Miller Subject: Re: release.sh: Thousands of warnings... Message-Id: <20140613181115.d7d67b7d.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 16:11:25 -0000 On Fri, 13 Jun 2014 08:36:49 -0400, Rick Miller wrote: > Hi all, > > During execution of release.sh to build FreeBSD releng/10.0 I see several > thousand warnings and conflicts. I am unsure whether or not these are > warnings and conflicts that I need to address somehow. I'd be most > appreciative of those that take a look at the logs and help me decipher > them. I had a short look at some of the warnings and would like to make the following claim: The compiler in use is in "maximum warnings mode", so it issues valid warnings about everything that might be a result of sloppy programming. Many warnings originate from GNU contributions, but also things ported from Solaris contain warnings. For example, the compiler questions if the precedence of || and && has been properly understood by the programmer, and suggests that he should use () to explicitely indicate what he wants; simplified: if (a && b || c && d) ... Is this if ((a && b) || (c && d)) ... as we would "intuitively" read it, or if (a && (b || c) && d) ... The evaluation (according to the C specification) for && and || is left to right, with && binding stronger than ||, so it's _clear_ that the first interpretation is correct. Still the compiler suggests using means to make this "more explicit". (Maybe there's even a C compiler that does not work as intended and interprets it in the 2nd way?) Similar warnings are printed for formatting strings that might not match the variable types associated with them, as well as "string + char" operations. In the same manner, the compiler wants to help by addresssing if-then-else topics, like if (x) ; else for (y, ...) ... Also type casting "irregularities" are being warned about. There are many other kinds of "possibly unintended" program code that the compiler considers worth a warning. I think it's common to ignore compiler warnings. If you compile ports, you will see a lot of them, especially when you compile ported software. You will furthermore see warnings when you run that software. Take a look at most X-related software and see how your ~/.xsession-errors fills with warnings and errors nobody seems to care about. There are other programmers who intendedly use -Wall or check for individual warning types to clean their code prior to any contribution or publication. They make sure no warnings are issued. I have no idea where those have gone. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...