From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/405 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts daily reports 8/12 - continuing pthread_eintr, still stuck with alloc Date: Fri, 12 Aug 2011 07:13:30 +0400 Message-ID: <20110812031330.GA4908@openwall.com> References: <4E4493E6.6050809@gmail.com> <20110812024725.GG132@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1313118815 31303 80.91.229.12 (12 Aug 2011 03:13:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Aug 2011 03:13:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-406-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 12 05:13:32 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QriBg-00053T-2v for gllmg-musl@lo.gmane.org; Fri, 12 Aug 2011 05:13:32 +0200 Original-Received: (qmail 13906 invoked by uid 550); 12 Aug 2011 03:13:31 -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 13898 invoked from network); 12 Aug 2011 03:13:31 -0000 Content-Disposition: inline In-Reply-To: <20110812024725.GG132@brightrain.aerifal.cx> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:405 Archived-At: On Thu, Aug 11, 2011 at 10:47:25PM -0400, Rich Felker wrote: > On Fri, Aug 12, 2011 at 04:45:58AM +0200, Luka Mar??eti?? wrote: > > static void > > child_wait_vp(void* foo) > > { > > child_wait(); > > ++foo; // -Wunused-parameter > > return; > > } > > This is invalid C. You cannot do arithmetic on void pointers. Right. It's a GNU extension that we don't want to depend on. > I would > really recommend -Wno-unused-parameter, as unused parameters are NOT a > sign of bad code, but a fundamental part of using function pointers. Rather than disable the warning, Luka can do: (void) foo; which is portable, unlike "++foo", and it silences the gcc warning too. In some cases, unused parameters do in fact indicate programming errors (such as a typo that resulted in another variable being used), so the warning is somewhat useful. Alexander