Re: [PATCH 1/2] ucm: Enable all warnings for automake C preprocessor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 27 Dec 2016 11:08:51 +0100,
mengdong.lin@xxxxxxxxxxxxxxx wrote:
> 
> From: Mengdong Lin <mengdong.lin@xxxxxxxxxxxxxxx>
> 
> To display warnings for us to fix them, add '-Wall' to AM_CPPFLAGS.

As Sakamoto-san already pointed, AM_CPPFLAGS is no correct variable to
set such a flag.

And, yet, an open question is whether we should add this
unconditionally or not.  In general, -W is a compiler-specific option,
and it's not always available.  That's why we didn't set it usually,
but leaving it in extra $CFLAGS pass mechanism at the invocation time,
as found in gitcompile script.

Of course, all gcc versions have -W options, but a 3rd party compiler
might not.  We may cover via autoconf, but it'll be messy too.  So, if
we really want to be safe, we shouldn't set it in Makefile.am but
leave user decide.

OTOH, -Wall is set in some subdirectories, and it's fine in 99.999%
cases.  We can add it mostly safely.

That said, I'm not quite sure (or don't care much) about this.  But if
we add -Wall, it'd be better to handle it in the top level, instead of
each subdirectory.


thanks,

Takashi

> 
> Signed-off-by: Mengdong Lin <mengdong.lin@xxxxxxxxxxxxxxx>
> 
> diff --git a/src/ucm/Makefile.am b/src/ucm/Makefile.am
> index 9d66b24..79e57d2 100644
> --- a/src/ucm/Makefile.am
> +++ b/src/ucm/Makefile.am
> @@ -7,4 +7,4 @@ noinst_HEADERS = ucm_local.h
>  all: libucm.la
>  
>  
> -AM_CPPFLAGS=-I$(top_srcdir)/include
> +AM_CPPFLAGS=-I$(top_srcdir)/include -Wall
> -- 
> 2.7.4
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux