From 8c33b64847c5ead45ade665afc9ad16a04a693f2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 10 Oct 2008 14:47:58 +0200 Subject: 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. --- src/audioOutputs/audioOutput_mvp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3