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.
This commit is contained in:
parent
cec9264d24
commit
8c33b64847
@ -66,7 +66,7 @@ typedef struct _MvpData {
|
|||||||
int fd;
|
int fd;
|
||||||
} MvpData;
|
} MvpData;
|
||||||
|
|
||||||
static int pcmfrequencies[][3] = {
|
static unsigned pcmfrequencies[][3] = {
|
||||||
{9, 8000, 32000},
|
{9, 8000, 32000},
|
||||||
{10, 11025, 44100},
|
{10, 11025, 44100},
|
||||||
{11, 12000, 48000},
|
{11, 12000, 48000},
|
||||||
@ -81,7 +81,8 @@ static int pcmfrequencies[][3] = {
|
|||||||
{15, 96000, 48000}
|
{15, 96000, 48000}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int numfrequencies = sizeof(pcmfrequencies) / 12;
|
static const unsigned numfrequencies =
|
||||||
|
sizeof(pcmfrequencies) / sizeof(pcmfrequencies[0]);
|
||||||
|
|
||||||
static int mvp_testDefault(void)
|
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,
|
static int mvp_setPcmParams(MvpData * md, unsigned long rate, int channels,
|
||||||
int big_endian, unsigned bits)
|
int big_endian, unsigned bits)
|
||||||
{
|
{
|
||||||
int iloop;
|
unsigned iloop;
|
||||||
int mix[5];
|
unsigned mix[5];
|
||||||
|
|
||||||
if (channels == 1)
|
if (channels == 1)
|
||||||
mix[0] = 1;
|
mix[0] = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user