mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 18:36:30 +01:00
Fix compile warnings
Fix trivial compile warnings.
This commit is contained in:
parent
6106ed8720
commit
9fb30e388f
3 changed files with 12 additions and 12 deletions
|
@ -538,13 +538,13 @@ mixer_convert_volume(snd_mixer_elem_t *elem,
|
|||
/* update enum list */
|
||||
static void update_enum_list(snd_mixer_elem_t *elem, int chn, int delta)
|
||||
{
|
||||
int eidx;
|
||||
unsigned int eidx;
|
||||
if (snd_mixer_selem_get_enum_item(elem, chn, &eidx) < 0)
|
||||
return;
|
||||
if (delta < 0) {
|
||||
eidx--;
|
||||
if (eidx < 0)
|
||||
if (eidx == 0)
|
||||
return;
|
||||
eidx--;
|
||||
} else {
|
||||
int items = snd_mixer_selem_get_enum_items(elem);
|
||||
if (items < 0)
|
||||
|
@ -800,7 +800,7 @@ static void display_enum_list(snd_mixer_elem_t *elem, int y, int x)
|
|||
|
||||
cury = y - 4;
|
||||
for (ch = 0; ch < 2; ch++) {
|
||||
int eidx, ofs;
|
||||
unsigned int eidx, ofs;
|
||||
char tmp[9];
|
||||
err = snd_mixer_selem_get_enum_item(elem, ch, &eidx);
|
||||
if (err < 0)
|
||||
|
|
|
@ -86,7 +86,7 @@ static snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK;
|
|||
static int mmap_flag = 0;
|
||||
static int interleaved = 1;
|
||||
static int nonblock = 0;
|
||||
static char *audiobuf = NULL;
|
||||
static u_char *audiobuf = NULL;
|
||||
static snd_pcm_uframes_t chunk_size = 0;
|
||||
static unsigned period_time = 0;
|
||||
static unsigned buffer_time = 0;
|
||||
|
@ -564,7 +564,7 @@ int main(int argc, char *argv[])
|
|||
chunk_size = 1024;
|
||||
hwparams = rhwparams;
|
||||
|
||||
audiobuf = (char *)malloc(1024);
|
||||
audiobuf = (u_char *)malloc(1024);
|
||||
if (audiobuf == NULL) {
|
||||
error(_("not enough memory"));
|
||||
return 1;
|
||||
|
@ -657,7 +657,7 @@ static int test_vocfile(void *buffer)
|
|||
* helper for test_wavefile
|
||||
*/
|
||||
|
||||
size_t test_wavefile_read(int fd, char *buffer, size_t *size, size_t reqsize, int line)
|
||||
size_t test_wavefile_read(int fd, u_char *buffer, size_t *size, size_t reqsize, int line)
|
||||
{
|
||||
if (*size >= reqsize)
|
||||
return *size;
|
||||
|
@ -682,10 +682,10 @@ size_t test_wavefile_read(int fd, char *buffer, size_t *size, size_t reqsize, in
|
|||
* == 0 if not
|
||||
* Value returned is bytes to be discarded.
|
||||
*/
|
||||
static ssize_t test_wavefile(int fd, char *_buffer, size_t size)
|
||||
static ssize_t test_wavefile(int fd, u_char *_buffer, size_t size)
|
||||
{
|
||||
WaveHeader *h = (WaveHeader *)_buffer;
|
||||
char *buffer = NULL;
|
||||
u_char *buffer = NULL;
|
||||
size_t blimit = 0;
|
||||
WaveFmtBody *f;
|
||||
WaveChunkHeader *c;
|
||||
|
@ -1418,9 +1418,9 @@ static ssize_t voc_pcm_write(u_char *data, size_t count)
|
|||
static void voc_write_silence(unsigned x)
|
||||
{
|
||||
unsigned l;
|
||||
char *buf;
|
||||
u_char *buf;
|
||||
|
||||
buf = (char *) malloc(chunk_bytes);
|
||||
buf = (u_char *) malloc(chunk_bytes);
|
||||
if (buf == NULL) {
|
||||
error(_("can't allocate buffer for silence"));
|
||||
return; /* not fatal error */
|
||||
|
|
|
@ -366,7 +366,7 @@ static void start_connection(void)
|
|||
{
|
||||
struct sockaddr_in addr;
|
||||
int i;
|
||||
int addr_len;
|
||||
socklen_t addr_len;
|
||||
|
||||
for (i = 0; i < max_connection; i++) {
|
||||
if (netfd[i] < 0)
|
||||
|
|
Loading…
Reference in a new issue