On Sat, 04.10.08 13:53, Daniel Macks ([EMAIL PROTECTED]) wrote: > Building libacanberra-0.9 on OS X 10.4, I get a compiler warning: > > read-wav.c: In function 'skip_to_chunk': > read-wav.c:63: warning: passing argument 2 of 'fseek' as signed due to > prototype > > Looking there, I see (extracting the relevant lines from that function): > > uint32_t s; > [...] > s = PA_UINT32_FROM_LE(chunk[1]); > [...] > *size = s; > [size is a uint32_t parameter to this function)] > [...] > if (fseek(w->file, s, SEEK_CUR) < 0) > return CA_ERROR_SYSTEM; > [fseek() second parameter is prototyped as "long")] > > I assume the goal is to move ahead chunk[1] in the file, so it seems > like "unsigned" it the right idea. Any chance that the unsigned > chunk[1] would be a larger (obviously positive) number than a signed > int can hold, or can we just cast it to a signed and silence the > warning?
I have now added an explicit cast in r215fb3e. Thanks, Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net ICQ# 11060553 http://0pointer.net/lennart/ GnuPG 0x1A015CC4 _______________________________________________ libcanberra-discuss mailing list [email protected] https://tango.0pointer.de/mailman/listinfo/libcanberra-discuss
