Use correct oggz argument type in examples.
The examples using oggz must use oggz_package as the second argument to read_package for the callback to be acceptable by oggz_set_read_callback(). Adjust the method signature to use oggz_package and extract the required ogg_package members from this one to avoid compiler message like this: fishsound-identify.c: In function ‘main’: fishsound-identify.c:101:37: warning: passing argument 3 of ‘oggz_set_read_callback’ from incompatible pointer type [-Wincompatible-pointer-types] 101 | oggz_set_read_callback (oggz, -1, read_packet, NULL); | ^~~~~~~~~~~ | | | int (*)(OGGZ *, ogg_packet *, long int, void *) {aka int (*)(void *, ogg_packet *, long int, void *)} In file included from /usr/include/oggz/oggz.h:576, from fishsound-identify.c:39: /usr/include/oggz/oggz_read.h:109:44: note: expected ‘OggzReadPacket’ {aka ‘int (*)(void *, oggz_packet *, long int, void *)’} but argument is of type ‘int (*)(OGGZ *, ogg_packet *, long int, void *)’ {aka ‘int (*)(void *, ogg_packet *, long int, void *)’} 109 | OggzReadPacket read_packet, void * user_data); | ~~~~~~~~~~~~~~~^~~~~~~~~~~ Fixes #13
parent
5115cc7a
No related branches found
No related tags found
Showing
- src/examples/fishsound-decenc.c 2 additions, 1 deletionsrc/examples/fishsound-decenc.c
- src/examples/fishsound-decode.c 2 additions, 1 deletionsrc/examples/fishsound-decode.c
- src/examples/fishsound-identify.c 2 additions, 2 deletionssrc/examples/fishsound-identify.c
- src/examples/fishsound-info.c 2 additions, 1 deletionsrc/examples/fishsound-info.c
Please register or sign in to comment