aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-10 14:47:58 +0200
committerMax Kellermann <max@duempel.org>2008-10-10 14:47:58 +0200
commit8c33b64847c5ead45ade665afc9ad16a04a693f2 (patch)
treebc2f39f2ffab637cd8fccca8bb6676e17e26beb6
parentcec9264d24f0cc34a74fa104bdc507694d106f2f (diff)
downloadmpd-8c33b64847c5ead45ade665afc9ad16a04a693f2.tar.gz
mpd-8c33b64847c5ead45ade665afc9ad16a04a693f2.tar.xz
mpd-8c33b64847c5ead45ade665afc9ad16a04a693f2.zip
mvp: unsinged integers
Fix some gcc warnings by using unsigned where appropriate. Declare numfrequencies as "const", and replaced the magic number 12 with a sizeof.
Diffstat (limited to '')
-rw-r--r--src/audioOutputs/audioOutput_mvp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/audioOutputs/audioOutput_mvp.c b/src/audioOutputs/audioOutput_mvp.c
index ab1fad896..70dd25f9d 100644
--- a/src/audioOutputs/audioOutput_mvp.c
+++ b/src/audioOutputs/audioOutput_mvp.c
@@ -66,7 +66,7 @@ typedef struct _MvpData {
int fd;
} MvpData;
-static int pcmfrequencies[][3] = {
+static unsigned pcmfrequencies[][3] = {
{9, 8000, 32000},
{10, 11025, 44100},
{11, 12000, 48000},
@@ -81,7 +81,8 @@ static int pcmfrequencies[][3] = {
{15, 96000, 48000}
};
-static int numfrequencies = sizeof(pcmfrequencies) / 12;
+static const unsigned numfrequencies =
+ sizeof(pcmfrequencies) / sizeof(pcmfrequencies[0]);
static int mvp_testDefault(void)
{
@@ -120,8 +121,8 @@ static void mvp_finishDriver(void *data)
static int mvp_setPcmParams(MvpData * md, unsigned long rate, int channels,
int big_endian, unsigned bits)
{
- int iloop;
- int mix[5];
+ unsigned iloop;
+ unsigned mix[5];
if (channels == 1)
mix[0] = 1;