Fix two gcc warnings.
authorAndre Noll <maan@systemlinux.org>
Mon, 4 May 2009 11:12:17 +0000 (13:12 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 4 May 2009 11:12:17 +0000 (13:12 +0200)
mp3_afh.c:420: warning: comparison of distinct pointer types lacks a cast
alsa_write.c:119: warning: format '%zu' expects type 'size_t', but argument 4 has type 'int'

alsa_write.c
mp3_afh.c

index 0bb3de3..df39716 100644 (file)
@@ -116,7 +116,7 @@ static int alsa_init(struct private_alsa_write_data *pad,
                * pad->channels / 8;
        if (pad->bytes_per_frame <= 0)
                return -E_PHYSICAL_WIDTH;
                * pad->channels / 8;
        if (pad->bytes_per_frame <= 0)
                return -E_PHYSICAL_WIDTH;
-       PARA_INFO_LOG("bytes per frame: %zu\n", pad->bytes_per_frame);
+       PARA_INFO_LOG("bytes per frame: %d\n", pad->bytes_per_frame);
        if (snd_pcm_nonblock(pad->handle, 1))
                PARA_ERROR_LOG("failed to set nonblock mode\n");
        return 1;
        if (snd_pcm_nonblock(pad->handle, 1))
                PARA_ERROR_LOG("failed to set nonblock mode\n");
        return 1;
index c62a523..2d18d5e 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -411,7 +411,7 @@ static int mp3_read_info(unsigned char *map, size_t numbytes, int fd,
                fpos += len;
                len = find_valid_start(map, numbytes, &fpos, &header);
                if (len <= 0) {
                fpos += len;
                len = find_valid_start(map, numbytes, &fpos, &header);
                if (len <= 0) {
-                       uint32_t end;
+                       size_t end;
                        ret = -E_MP3_INFO;
                        if (!afhi->chunks_total)
                                goto err_out;
                        ret = -E_MP3_INFO;
                        if (!afhi->chunks_total)
                                goto err_out;