Skip to content

Commit 7f7b030

Browse files
committed
flexelinting
seen outside tree with less warnings suppressed Info 747: Significant prototype coercion (arg. no. 1) int to unsigned long
1 parent 63d6f3f commit 7f7b030

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/miniobj.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525

2626
#define ALLOC_OBJ(to, type_magic) \
2727
do { \
28-
(to) = calloc(1, sizeof *(to)); \
28+
(to) = calloc((size_t)1, sizeof *(to)); \
2929
if ((to) != NULL) \
3030
(to)->magic = (type_magic); \
3131
} while (0)
3232

3333
#define ALLOC_OBJ_EXTRA(to, extra_size, type_magic) \
3434
do { \
35-
(to) = calloc(1, sizeof(*(to)) + (extra_size)); \
35+
(to) = calloc((size_t)1, sizeof(*(to)) + (extra_size)); \
3636
if ((to) != NULL) \
3737
(to)->magic = (type_magic); \
3838
} while (0)
@@ -42,7 +42,7 @@
4242

4343
#define ALLOC_FLEX_OBJ(to, fld, len, type_magic) \
4444
do { \
45-
(to) = calloc(1, SIZEOF_FLEX_OBJ(to, fld, len)); \
45+
(to) = calloc((size_t)1, SIZEOF_FLEX_OBJ(to, fld, len));\
4646
if ((to) != NULL) \
4747
(to)->magic = (type_magic); \
4848
} while (0)

0 commit comments

Comments
 (0)