]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
fix some compiler warnings on Mac OS
authorAndre Noll <maan@systemlinux.org>
Wed, 4 Apr 2007 08:33:00 +0000 (10:33 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 4 Apr 2007 08:33:00 +0000 (10:33 +0200)
add two casts to make gcc stfu.

fd.c
mp3_afh.c

diff --git a/fd.c b/fd.c
index db1825cdbf991c3426270c5dc8a00ad0b9cd6499..ec174ff69ed768645bd92705d1384b0cc074ea06 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -165,7 +165,7 @@ void *para_mmap(size_t length, int prot, int flags, int fd, off_t offset)
                return ret;
        PARA_EMERG_LOG("mmap failed: %s\n", strerror(errno));
        PARA_EMERG_LOG("length: %zu, flags: %d, fd: %d, offset: %zu\n",
                return ret;
        PARA_EMERG_LOG("mmap failed: %s\n", strerror(errno));
        PARA_EMERG_LOG("length: %zu, flags: %d, fd: %d, offset: %zu\n",
-               length, flags, fd, offset);
+               length, flags, fd, (size_t)offset);
        exit(EXIT_FAILURE);
 }
 
        exit(EXIT_FAILURE);
 }
 
index 9ef5dffb76a6c46542d827d3674e202ee27204a9..4764d3ceb8c9de0d6f07d001dc89e15fd17dc26a 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -280,7 +280,7 @@ static void mp3_get_id3(unsigned char *map, off_t numbytes, off_t *fpos)
        if (numbytes < 128)
                return;
        *fpos = numbytes - 128;
        if (numbytes < 128)
                return;
        *fpos = numbytes - 128;
-       if (strncmp("TAG", map + *fpos, 3)) {
+       if (strncmp("TAG", (char *) map + *fpos, 3)) {
                PARA_INFO_LOG("%s", "no id3 tag\n");
                return;
        }
                PARA_INFO_LOG("%s", "no id3 tag\n");
                return;
        }