Skip to content

Commit 226d8a5

Browse files
committed
test_opus_extensions.c: Fix 32-bit compile errors
Fix multiple occurrences of the following error: tests/test_opus_extensions.c: In function ‘test_extensions_parse_success’: tests/test_opus_extensions.c:273:64: error: passing argument 4 of ‘opus_packet_extensions_parse’ from incompatible pointer type [-Wincompatible-pointer-types] 273 | result = opus_packet_extensions_parse(packet, len, ext_out, &nb_ext, | ^~~~~~~ | | | int * In file included from tests/test_opus_extensions.c:43: tests/../src/opus_private.h:247:63: note: expected ‘opus_int32 *’ {aka ‘long int *’} but argument is of type ‘int *’ 247 | opus_int32 len, opus_extension_data *extensions, opus_int32 *nb_extensions, | ~~~~~~~~~~~~^~~~~~~~~~~~~
1 parent 2feff46 commit 226d8a5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_opus_extensions.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void test_extensions_parse_success(void)
259259
{4, 4, (const unsigned char *)NULL, 0}
260260
};
261261
opus_extension_data ext_out[10];
262-
int nb_ext;
262+
opus_int32 nb_ext;
263263
int nb_frames;
264264
int len, result;
265265
unsigned char packet[32];
@@ -299,7 +299,7 @@ void test_extensions_parse_zero(void)
299299
static const opus_extension_data ext[] = {
300300
{32, 1, (const unsigned char *)"DRED", 4},
301301
};
302-
int nb_ext;
302+
opus_int32 nb_ext;
303303
int nb_frames;
304304
int len, result;
305305
unsigned char packet[32];
@@ -325,7 +325,7 @@ void test_extensions_parse_fail(void)
325325
{4, 10, (const unsigned char *)"c", 1}
326326
};
327327
opus_extension_data ext_out[10];
328-
int nb_ext;
328+
opus_int32 nb_ext;
329329
int nb_frames;
330330
int len, result;
331331
unsigned char packet[32];
@@ -406,7 +406,7 @@ void test_extensions_parse_fail(void)
406406
ext_out, with extensions in ext_out appearing in frame order, and the order
407407
within a frame matching the order within a frame in ext_in. */
408408
static void check_ext_data(const opus_extension_data *ext_in,
409-
const opus_extension_data *ext_out, int nb_ext)
409+
const opus_extension_data *ext_out, opus_int32 nb_ext)
410410
{
411411
opus_int32 i;
412412
opus_int32 j;
@@ -582,7 +582,7 @@ void test_random_extensions_parse(void)
582582
{
583583
opus_extension_data ext_out[MAX_NB_EXTENSIONS];
584584
int nb_frames;
585-
int nb_ext;
585+
opus_int32 nb_ext;
586586
unsigned char payload[MAX_EXTENSION_SIZE];
587587
int len;
588588
int j;
@@ -643,7 +643,7 @@ void test_opus_repacketizer_out_range_impl(void)
643643
opus_int32 padding_len;
644644
opus_extension_data ext_out[10];
645645
int i;
646-
int nb_ext;
646+
opus_int32 nb_ext;
647647
int res, len;
648648
int first_count = 0, second_count = 0;
649649
static const opus_extension_data ext[] = {

0 commit comments

Comments
 (0)