1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Explicitly pass unsigned long to alloc functions

This is just to squelch Wconversion warnings on older GCC, making the
build output easier to read. No functional change.
This commit is contained in:
Moritz Grimm 2015-05-26 08:04:04 +02:00
parent 5548971fe3
commit e05629e7fd

View File

@ -10,10 +10,10 @@ START_TEST(test_malloc)
{ {
void *p; void *p;
p = xmalloc(0); p = xmalloc(0UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
p = xmalloc(1); p = xmalloc(1UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
} }
@ -23,16 +23,16 @@ START_TEST(test_calloc)
{ {
void *p; void *p;
p = xcalloc(0, 0); p = xcalloc(0UL, 0UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
p = xcalloc(1, 0); p = xcalloc(1UL, 0UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
p = xcalloc(0, 1); p = xcalloc(0UL, 1UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
p = xcalloc(1, 1); p = xcalloc(1UL, 1UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
} }
@ -42,20 +42,20 @@ START_TEST(test_reallocarray)
{ {
void *p; void *p;
p = xreallocarray(NULL, 0, 0); p = xreallocarray(NULL, 0UL, 0UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
p = xreallocarray(NULL, 1, 0); p = xreallocarray(NULL, 1UL, 0UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
p = xreallocarray(NULL, 0, 1); p = xreallocarray(NULL, 0UL, 1UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
p = xreallocarray(NULL, 1, 1); p = xreallocarray(NULL, 1UL, 1UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
p = xreallocarray(p, 2, 2); p = xreallocarray(p, 2UL, 2UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
p = xreallocarray(p, 1, 1); p = xreallocarray(p, 1UL, 1UL);
ck_assert_ptr_ne(p, NULL); ck_assert_ptr_ne(p, NULL);
xfree(p); xfree(p);
} }