From: Takashi Iwai Subject: Re: snd_ctl compiler warnings Date: Fri, 07 Nov 2008 12:19:08 +0100 Message-ID: References: <200811070852.43936.gineera@aspect135.co.uk> <200811071032.22917.gineera@aspect135.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id D241C2432D for ; Fri, 7 Nov 2008 12:19:08 +0100 (CET) In-Reply-To: <200811071032.22917.gineera@aspect135.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Alan Horstmann Cc: ALSA devel List-Id: alsa-devel@alsa-project.org At Fri, 7 Nov 2008 10:32:22 +0000, Alan Horstmann wrote: > > On Friday 07 November 2008 09:58, you wrote: > > At Fri, 7 Nov 2008 08:52:43 +0000, > > Alan Horstmann wrote: > > > The code I am working with at present includes unremarkable lines such > > > as: > > > > > > snd_ctl_elem_value_t *line_in_vol; > > > snd_ctl_elem_value_alloca(&line_in_vol); > > > > > > Building this with a cross compiler for arm based on gcc 4.2.1 gives this > > > > > > warning for the 2nd line: > > > : warning: the address of 'line_in_vol' will always evaluate as 'true' > > > > > > but an older compiler on the desktop does not show this. Would this > > > warning be expected in these circumstances, or is the compiler being over > > > zealous? Am I missing something or is there a straightforward way to > > > avoid such warnings? (Code runs OK). > > > > Try the later version of alsa-lib. > > This should have been already fixed. > > Thanks very much. You presumably refer to: > > http:// > git.alsa-project.org/?p=alsa-lib.git;a=commit;h=68e5771a6f7a2aae2dbd02a097719bcd25c6f307 > > Right now a rebuild of the working environment would be a bit tricky. At the > next opportunity I'll see if we can apply that patch to alsa-lib (I think it > is 1.0.15 -based) and rebuild. In the meantime the warnings are presumably > fairly harmless? Yes. It's just a noise and can be safely ignored. Takashi