Skip to content
Snippets Groups Projects
Commit e1ee9862 authored by Petter Reinholdtsen's avatar Petter Reinholdtsen
Browse files

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
1 merge request!4Use correct oggz argument type in examples.
Pipeline #5798 failed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment