aboutsummaryrefslogtreecommitdiffstats
path: root/src/volume.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-07-17 00:15:34 +0000
committerEric Wong <normalperson@yhbt.net>2006-07-17 00:15:34 +0000
commita234780aab8b2d693502e03165f658f96c956969 (patch)
treef8c9a6d72a4478f6c8a769e797483dfb0ce88f2e /src/volume.c
parent0c24fc0cb33dd6482670a54ed80c7dc67ebc929c (diff)
downloadmpd-a234780aab8b2d693502e03165f658f96c956969.tar.gz
mpd-a234780aab8b2d693502e03165f658f96c956969.tar.xz
mpd-a234780aab8b2d693502e03165f658f96c956969.zip
sparse: ANSI-fy function declarations
These are just warnings from sparse, but it makes the output easier to read. I ran this through a quick perl script, but of course verified the output by looking at the diff and making sure the thing still compiles. here's the quick perl script I wrote to generate this patch: ----------- 8< ----------- use Tie::File; defined(my $pid = open my $fh, '-|') or die $!; if (!$pid) { open STDERR, '>&STDOUT' or die $!; exec 'sparse', @ARGV or die $!; } my $na = 'warning: non-ANSI function declaration of function'; while (<$fh>) { print STDERR $_; if (/^(.+?\.[ch]):(\d+):(\d+): $na '(\w+)'/o) { my ($f, $l, $pos, $func) = ($1, $2, $3, $4); $l--; tie my @x, 'Tie::File', $f or die "$!: $f"; print '-', $x[$l], "\n"; $x[$l] =~ s/\b($func\s*)\(\s*\)/$1(void)/; print '+', $x[$l], "\n"; untie @x; } } git-svn-id: https://svn.musicpd.org/mpd/trunk@4378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/volume.c')
-rw-r--r--src/volume.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/volume.c b/src/volume.c
index d398457d3..b22d29e68 100644
--- a/src/volume.c
+++ b/src/volume.c
@@ -144,7 +144,7 @@ static int ensure_oss_open(void)
return 0;
}
-static int getOssVolumeLevel() {
+static int getOssVolumeLevel(void) {
int left, right, level;
if (ensure_oss_open() < 0)
@@ -298,7 +298,7 @@ error:
return -1;
}
-static int getAlsaVolumeLevel() {
+static int getAlsaVolumeLevel(void) {
int ret;
long level;
long max = volume_alsaMax;
@@ -374,7 +374,7 @@ static int prepMixer(char * device) {
return 0;
}
-void finishVolume() {
+void finishVolume(void) {
switch(volume_mixerType) {
#ifdef HAVE_ALSA
case VOLUME_MIXER_TYPE_ALSA:
@@ -389,7 +389,7 @@ void finishVolume() {
}
}
-void initVolume() {
+void initVolume(void) {
ConfigParam * param = getConfigParam(CONF_MIXER_TYPE);
if(param) {
@@ -424,18 +424,18 @@ void initVolume() {
}
}
-void openVolumeDevice() {
+void openVolumeDevice(void) {
if(prepMixer(volume_mixerDevice)<0) {
WARNING("using software volume\n");
volume_mixerType = VOLUME_MIXER_TYPE_SOFTWARE;
}
}
-static int getSoftwareVolume() {
+static int getSoftwareVolume(void) {
return volume_softwareSet;
}
-int getVolumeLevel() {
+int getVolumeLevel(void) {
switch(volume_mixerType) {
#ifdef HAVE_ALSA
case VOLUME_MIXER_TYPE_ALSA: