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);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~
Edited by Petter Reinholdtsen
Merge request reports
Activity
requested review from @rillian
mentioned in issue #13 (closed)
added 9 commits
-
5ac845e7...5115cc7a - 8 commits from branch
master
- e1ee9862 - Use correct oggz argument type in examples.
-
5ac845e7...5115cc7a - 8 commits from branch
mentioned in merge request !2 (merged)
mentioned in merge request !5 (merged)
Just for the record, the CI run for this patch will not turn green until !5 (merged) is applied.
mentioned in commit 181f9956
Please register or sign in to reply