Update of /cvsroot/alsa/alsa-lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32446
Modified Files: pcm.c Log Message: Warning fixes Index: pcm.c =================================================================== RCS file: /cvsroot/alsa/alsa-lib/test/pcm.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- pcm.c 5 Mar 2004 09:11:13 -0000 1.31 +++ pcm.c 6 Apr 2004 17:28:01 -0000 1.32 @@ -35,7 +35,8 @@ double res; signed short *samples[channels]; int steps[channels]; - int chn, ires; + unsigned int chn; + int ires; /* verify and prepare the contents of areas */ for (chn = 0; chn < channels; chn++) { @@ -270,7 +271,7 @@ ufds = malloc(sizeof(struct pollfd) * count); if (ufds == NULL) { printf("No enough memory\n"); - return err;; + return -ENOMEM; } if ((err = snd_pcm_poll_descriptors(handle, ufds, count)) < 0) { printf("Unable to obtain poll descriptors for playback: %s\n", snd_strerror(err)); @@ -479,7 +480,7 @@ } generate_sine(my_areas, offset, frames, &data->phase); commitres = snd_pcm_mmap_commit(handle, offset, frames); - if (commitres < 0 || commitres != frames) { + if (commitres < 0 || (snd_pcm_uframes_t)commitres != frames) { if ((err = xrun_recovery(handle, commitres >= 0 ? -EPIPE : commitres)) < 0) { printf("MMAP commit error: %s\n", snd_strerror(err)); exit(EXIT_FAILURE); @@ -523,7 +524,7 @@ } generate_sine(my_areas, offset, frames, &data.phase); commitres = snd_pcm_mmap_commit(handle, offset, frames); - if (commitres < 0 || commitres != frames) { + if (commitres < 0 || (snd_pcm_uframes_t)commitres != frames) { if ((err = xrun_recovery(handle, commitres >= 0 ? -EPIPE : commitres)) < 0) { printf("MMAP commit error: %s\n", snd_strerror(err)); exit(EXIT_FAILURE); @@ -619,7 +620,7 @@ } generate_sine(my_areas, offset, frames, &phase); commitres = snd_pcm_mmap_commit(handle, offset, frames); - if (commitres < 0 || commitres != frames) { + if (commitres < 0 || (snd_pcm_uframes_t)commitres != frames) { if ((err = xrun_recovery(handle, commitres >= 0 ? -EPIPE : commitres)) < 0) { printf("MMAP commit error: %s\n", snd_strerror(err)); exit(EXIT_FAILURE); @@ -736,7 +737,7 @@ snd_pcm_sw_params_t *swparams; int method = 0; signed short *samples; - int chn; + unsigned int chn; snd_pcm_channel_area_t *areas; snd_pcm_hw_params_alloca(&hwparams); ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog