Skip to content

Commit

Permalink
FIX: silenced incompatible pointer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Sep 2, 2021
1 parent 8c02776 commit f465469
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/include/sys-int-funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ REBOOL reb_u32_add_overflow(u32 x, u32 y, u32 *sum);

#if __has_builtin(__builtin_saddl_overflow) && __has_builtin(__builtin_saddll_overflow) || GCC_VERSION_AT_LEAST(5, 1)
#ifdef __LP64__
#define REB_I64_ADD_OF(x, y, sum) __builtin_saddl_overflow((x), (y), (sum))
#define REB_I64_ADD_OF(x, y, sum) __builtin_saddl_overflow((x), (y), (long*)(sum))
#else // presumably __LLP64__ or __LP32__
#define REB_I64_ADD_OF(x, y, sum) __builtin_saddll_overflow((x), (y), (sum))
#endif //__LP64__
Expand All @@ -64,7 +64,7 @@ REBOOL reb_i64_add_overflow(i64 x, i64 y, i64 *sum);

#if __has_builtin(__builtin_uaddl_overflow) && __has_builtin(__builtin_uaddll_overflow) || GCC_VERSION_AT_LEAST(5, 1)
#ifdef __LP64__
#define REB_U64_ADD_OF(x, y, sum) __builtin_uaddl_overflow((x), (y), (sum))
#define REB_U64_ADD_OF(x, y, sum) __builtin_uaddl_overflow((x), (y), (long*)(sum))
#else // presumably __LLP64__ or __LP32__
#define REB_U64_ADD_OF(x, y, sum) __builtin_uaddll_overflow((x), (y), (sum))
#endif //__LP64__
Expand All @@ -82,7 +82,7 @@ REBOOL reb_i32_sub_overflow(i32 x, i32 y, i32 *diff);

#if __has_builtin(__builtin_ssubl_overflow) && __has_builtin(__builtin_ssubll_overflow) || GCC_VERSION_AT_LEAST(5, 1)
#ifdef __LP64__
#define REB_I64_SUB_OF(x, y, diff) __builtin_ssubl_overflow((x), (y), (diff))
#define REB_I64_SUB_OF(x, y, diff) __builtin_ssubl_overflow((x), (y), (long*)(diff))
#else // presumably __LLP64__ or __LP32__
#define REB_I64_SUB_OF(x, y, diff) __builtin_ssubll_overflow((x), (y), (diff))
#endif //__LP64__
Expand All @@ -107,7 +107,7 @@ REBOOL reb_u32_mul_overflow(u32 x, u32 y, u32 *prod);

#if __has_builtin(__builtin_smull_overflow) && __has_builtin(__builtin_smulll_overflow) || GCC_VERSION_AT_LEAST(5, 1)
#ifdef __LP64__
#define REB_I64_MUL_OF(x, y, prod) __builtin_smull_overflow((x), (y), (prod))
#define REB_I64_MUL_OF(x, y, prod) __builtin_smull_overflow((x), (y), (long*)(prod))
#elif !defined(__clang__) //__builtin_smulll_overflow doesn't work on 32-bit systems yet, causing undefined reference to __mulodi4
#define REB_I64_MUL_OF(x, y, prod) __builtin_smulll_overflow((x), (y), (prod))
#else
Expand All @@ -121,7 +121,7 @@ REBOOL reb_i64_mul_overflow(i64 x, i64 y, i64 *prod);

#if __has_builtin(__builtin_umull_overflow) && __has_builtin(__builtin_umulll_overflow) || GCC_VERSION_AT_LEAST(5, 1)
#ifdef __LP64__
#define REB_U64_MUL_OF(x, y, prod) __builtin_umull_overflow((x), (y), (prod))
#define REB_U64_MUL_OF(x, y, prod) __builtin_umull_overflow((x), (y), (long*)(prod))
#else // presumably __LLP64__ or __LP32__
#define REB_U64_MUL_OF(x, y, prod) __builtin_umulll_overflow((x), (y), (prod))
#endif //__LP64__
Expand Down
2 changes: 1 addition & 1 deletion src/os/posix/host-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ static inline REBOOL Open_Pipe_Fails(int pipefd[2]) {
char **buffer = NULL;
u32 *offset;
size_t to_read = 0;
size_t *size = NULL;
off_t *size = NULL;
if (pfds[i].fd == stdout_pipe[R]) {
buffer = (char**)output;
offset = output_len;
Expand Down

0 comments on commit f465469

Please sign in to comment.