[alsa-devel] [PATCH 0/3] Usage of AM_SILENT_RULES and small cleanup
Hello.
While working with alsa-lib to get scenarios in shape and submitted later I added support for the new automake feature AM_SILENT_RULES and did some small cleanups.
[PATCH 1/3] cvscompile: Remove in favour of gitcompile. I see no reason to keep this around when CVS is no longer used and gitcompile does replace it. Something I miss here?
[PATCH 2/3] configure.in: Add m4 check for new AM_SILENT_RULES The kbuild like output makes it a lot easier to follow the compile and linking process, at least in my opinion. It is available with automake 1.11 and we use a m4 macro here to only use it when it is available.
[PATCH 3/3] control: Remove unused variable. Found while really seeing what is going on thanks to AM_SILENT_RULES: ;)
There are also some unused paramter and a function around. I don't know how you guys prefer to handle this in the ALSA project so I did not prepare patches for this yet. Let me know if you want some for it.
pcm_route.c: In function ‘snd_pcm_route_convert1_many’: pcm_route.c:350: warning: ‘src’ may be used uninitialized in this function pcm_rate_linear.c: In function ‘get_supported_rates’: pcm_rate_linear.c:408: warning: unused parameter ‘rate’ pcm_rate_linear.c: In function ‘linear_dump’: pcm_rate_linear.c:416: warning: unused parameter ‘rate’ pcm_rate_linear.c: In function ‘_snd_pcm_rate_linear_open’: pcm_rate_linear.c:435: warning: unused parameter ‘version’ alisp.c:237: warning: ‘incref_tree_explicit’ defined but not used
regards Stefan Schmidt
From: Stefan Schmidt stefan@slimlogic.co.uk
Alsa-lib is no longer hosted in cvs but in git and the only difference between both helper scripts is the name of the NO_MAKE env VAR check.
Signed-off-by: Stefan Schmidt stefan@slimlogic.co.uk --- cvscompile | 19 ------------------- 1 files changed, 0 insertions(+), 19 deletions(-) delete mode 100755 cvscompile
diff --git a/cvscompile b/cvscompile deleted file mode 100755 index af7700e..0000000 --- a/cvscompile +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e - -touch ltconfig -libtoolize --force --copy --automake -aclocal $ACLOCAL_FLAGS -autoheader -automake --foreign --copy --add-missing -touch depcomp # seems to be missing for old automake -autoconf -export CFLAGS='-O2 -Wall -W -pipe -g' -echo "CFLAGS=$CFLAGS" -echo "./configure $@" -./configure $@ || exit 1 -unset CFLAGS -if [ -z "$CVSCOMPILE_NO_MAKE" ]; then - make -fi
From: Stefan Schmidt stefan@slimlogic.co.uk
Kbuild like output for automake (>=1.11). It's no hard dependency as it needs the newest automake, but enable it by default if it is available. To turn it off you can either use --disable-silent-rules at configure time or make V=0 at compile time.
Signed-off-by: Stefan Schmidt stefan@slimlogic.co.uk --- configure.in | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in index 3cd6366..a455de1 100644 --- a/configure.in +++ b/configure.in @@ -17,6 +17,9 @@ eval LIBTOOL_VERSION_INFO="2:0:0" dnl ************************************************* AM_CONDITIONAL(INSTALL_M4, test -n "${ACLOCAL}")
+# Test for new silent rules and enable only if they are available +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
From: Stefan Schmidt stefan@slimlogic.co.uk
Signed-off-by: Stefan Schmidt stefan@slimlogic.co.uk --- src/control/control.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/control/control.c b/src/control/control.c index ae70e76..51628ba 100644 --- a/src/control/control.c +++ b/src/control/control.c @@ -675,7 +675,7 @@ int snd_ctl_wait(snd_ctl_t *ctl, int timeout) { struct pollfd *pfd; unsigned short revents; - int i, npfds, err, err_poll; + int npfds, err, err_poll;
npfds = snd_ctl_poll_descriptors_count(ctl); if (npfds <= 0 || npfds >= 16) {
At Tue, 29 Sep 2009 23:48:18 +0200, Stefan Schmidt wrote:
Hello.
While working with alsa-lib to get scenarios in shape and submitted later I added support for the new automake feature AM_SILENT_RULES and did some small cleanups.
[PATCH 1/3] cvscompile: Remove in favour of gitcompile. I see no reason to keep this around when CVS is no longer used and gitcompile does replace it. Something I miss here?
[PATCH 2/3] configure.in: Add m4 check for new AM_SILENT_RULES The kbuild like output makes it a lot easier to follow the compile and linking process, at least in my opinion. It is available with automake 1.11 and we use a m4 macro here to only use it when it is available.
[PATCH 3/3] control: Remove unused variable. Found while really seeing what is going on thanks to AM_SILENT_RULES: ;)
Thanks, applied all patches now.
There are also some unused paramter and a function around. I don't know how you guys prefer to handle this in the ALSA project so I did not prepare patches for this yet. Let me know if you want some for it.
pcm_route.c: In function ‘snd_pcm_route_convert1_many’: pcm_route.c:350: warning: ‘src’ may be used uninitialized in this function
I think this is false-positive, so let it be.
pcm_rate_linear.c: In function ‘get_supported_rates’: pcm_rate_linear.c:408: warning: unused parameter ‘rate’ pcm_rate_linear.c: In function ‘linear_dump’: pcm_rate_linear.c:416: warning: unused parameter ‘rate’ pcm_rate_linear.c: In function ‘_snd_pcm_rate_linear_open’: pcm_rate_linear.c:435: warning: unused parameter ‘version’
These can be suppressed simply by adding ATTRIBUTE_UNUSED.
alisp.c:237: warning: ‘incref_tree_explicit’ defined but not used
This can be commented out.
Care to send fix patches?
thanks,
Takashi
Hello.
On Wed, 2009-09-30 at 08:25, Takashi Iwai wrote:
At Tue, 29 Sep 2009 23:48:18 +0200, Stefan Schmidt wrote:
While working with alsa-lib to get scenarios in shape and submitted later I added support for the new automake feature AM_SILENT_RULES and did some small cleanups.
[PATCH 1/3] cvscompile: Remove in favour of gitcompile. I see no reason to keep this around when CVS is no longer used and gitcompile does replace it. Something I miss here?
[PATCH 2/3] configure.in: Add m4 check for new AM_SILENT_RULES The kbuild like output makes it a lot easier to follow the compile and linking process, at least in my opinion. It is available with automake 1.11 and we use a m4 macro here to only use it when it is available.
[PATCH 3/3] control: Remove unused variable. Found while really seeing what is going on thanks to AM_SILENT_RULES: ;)
Thanks, applied all patches now.
Great, thanks. :)
There are also some unused paramter and a function around. I don't know how you guys prefer to handle this in the ALSA project so I did not prepare patches for this yet. Let me know if you want some for it.
pcm_route.c: In function ‘snd_pcm_route_convert1_many’: pcm_route.c:350: warning: ‘src’ may be used uninitialized in this function
I think this is false-positive, so let it be.
OK.
pcm_rate_linear.c: In function ‘get_supported_rates’: pcm_rate_linear.c:408: warning: unused parameter ‘rate’ pcm_rate_linear.c: In function ‘linear_dump’: pcm_rate_linear.c:416: warning: unused parameter ‘rate’ pcm_rate_linear.c: In function ‘_snd_pcm_rate_linear_open’: pcm_rate_linear.c:435: warning: unused parameter ‘version’
These can be suppressed simply by adding ATTRIBUTE_UNUSED.
alisp.c:237: warning: ‘incref_tree_explicit’ defined but not used
This can be commented out.
Care to send fix patches?
See the new patchset on the list. Hope that is what you had in mind.
regards Stefan Schmidt
At Wed, 30 Sep 2009 12:36:40 +0200, Stefan Schmidt wrote:
pcm_rate_linear.c: In function ‘get_supported_rates’: pcm_rate_linear.c:408: warning: unused parameter ‘rate’ pcm_rate_linear.c: In function ‘linear_dump’: pcm_rate_linear.c:416: warning: unused parameter ‘rate’ pcm_rate_linear.c: In function ‘_snd_pcm_rate_linear_open’: pcm_rate_linear.c:435: warning: unused parameter ‘version’
These can be suppressed simply by adding ATTRIBUTE_UNUSED.
alisp.c:237: warning: ‘incref_tree_explicit’ defined but not used
This can be commented out.
Care to send fix patches?
See the new patchset on the list. Hope that is what you had in mind.
Yep, that's exactly what I mentioned. Both applied now. Thanks!
Takashi
On Tue, 2009-09-29 at 23:48 +0200, Stefan Schmidt wrote:
Hello.
While working with alsa-lib to get scenarios in shape and submitted later I added support for the new automake feature AM_SILENT_RULES and did some small cleanups.
[PATCH 1/3] cvscompile: Remove in favour of gitcompile. I see no reason to keep this around when CVS is no longer used and gitcompile does replace it. Something I miss here?
[PATCH 2/3] configure.in: Add m4 check for new AM_SILENT_RULES The kbuild like output makes it a lot easier to follow the compile and linking process, at least in my opinion. It is available with automake 1.11 and we use a m4 macro here to only use it when it is available.
[PATCH 3/3] control: Remove unused variable. Found while really seeing what is going on thanks to AM_SILENT_RULES: ;)
All Acked-by: Liam Girdwood lrg@slimlogic.co.uk
Liam
participants (3)
-
Liam Girdwood
-
Stefan Schmidt
-
Takashi Iwai