Skip to contentSkip to conversation

Usage of AM_SILENT_RULES and small cleanup

PATCH Applied Stefan Schmidt 3 participants 8 messages Sep 29, 2009 – Sep 30, 2009

lore
Share & tools
lore
#0 lore raw

cover 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
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

PATCH 1/3 cvscompile: Remove in favour of gitcompile.

From: Stefan Schmidt <[email protected]>

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.

---
 cvscompile |   19 -------------------
 1 files changed, 0 insertions(+), 19 deletions(-)
 delete mode 100755 cvscompile
cvscompile deleted +0 -19
deleted file mode 100755
index af7700e..0000000
@@ -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
Signature · 1 line
1.6.4.3
#2 lore raw

PATCH 2/3 configure.in: Add m4 check for new AM_SILENT_RULES

In reply to Stefan Schmidt

From: Stefan Schmidt <[email protected]>

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.

---
 configure.in |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
configure.in +3 -0
index 3cd6366..a455de1 100644
@@ -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.
Signature · 1 line
1.6.4.3
#3 lore raw

PATCH 3/3 control: Remove unused variable.

In reply to Stefan Schmidt

From: Stefan Schmidt <[email protected]>

---
 src/control/control.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
src/control/control.c +1 -1
index ae70e76..51628ba 100644
@@ -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) {
Signature · 1 line
1.6.4.3
Applied
#4 lore raw
In reply to Stefan Schmidt

At Tue, 29 Sep 2009 23:48:18 +0200,

Quoted 11 lines · Stefan Schmidt

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?

Quoted 7 lines

[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.

Quoted 6 lines

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.

Quoted 6 lines

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.

Quoted 1 line

alisp.c:237: warning: ‘incref_tree_explicit’ defined but not used

This can be commented out.

Care to send fix patches?

thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#5 lore raw

Hello.

Quoted 16 lines · Takashi Iwai

At Tue, 29 Sep 2009 23:48:18 +0200,

Quoted 14 lines · Stefan Schmidt

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.

Quoted 4 lines
Quoted 2 lines

[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. :)

Quoted 8 lines
Quoted 6 lines

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.

Quoted 7 lines
Quoted 6 lines

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’

Quoted 7 lines

These can be suppressed simply by adding ATTRIBUTE_UNUSED.

Quoted 1 line

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
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#6 lore raw

At Wed, 30 Sep 2009 12:36:40 +0200,

Quoted 10 lines · Stefan Schmidt
Quoted 10 lines
Quoted 7 lines

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.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

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
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#7 lore raw
In reply to Stefan Schmidt
Quoted 10 lines · Stefan Schmidt

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?

Quoted 8 lines

[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 <[email protected]>

Liam