From d43f1a32489e7d22c73f6d6e7a6df59436ad3e17 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 22 Nov 2012 17:47:49 +0100 Subject: Fix clang compiler warnings on FreeBSD in erts The following are deliberately left, as I have only a list of compiler warnings and no system to test on: hipe/hipe_x86_signal.c:264:5: warning: no previous prototype for function '_sigaction' [-Wmissing-prototypes] int __SIGACTION(int signum, const struct sigaction *act, struct sigaction *oldact) ^ hipe/hipe_x86_signal.c:222:21: note: expanded from macro '__SIGACTION' ^ 1 warning generated. sys/unix/sys_float.c:835:16: warning: declaration of 'struct exception' will not be visible outside of this function [-Wvisibility] matherr(struct exception *exc) ^ sys/unix/sys_float.c:835:1: warning: no previous prototype for function 'matherr' [-Wmissing-prototypes] matherr(struct exception *exc) ^ 2 warnings generated. drivers/unix/unix_efile.c:1504:11: warning: implicit declaration of function 'sendfile' [-Wimplicit-function-declaration] retval = sendfile(in_fd, out_fd, *offset, SENDFILE_CHUNK_SIZE, ^ 1 warning generated. --- erts/lib_src/common/erl_printf_format.c | 2 +- erts/lib_src/common/ethr_mutex.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'erts/lib_src') diff --git a/erts/lib_src/common/erl_printf_format.c b/erts/lib_src/common/erl_printf_format.c index fd25cce7ed..384b1b1ad7 100644 --- a/erts/lib_src/common/erl_printf_format.c +++ b/erts/lib_src/common/erl_printf_format.c @@ -339,7 +339,7 @@ static int fmt_double(fmtfn_t fn,void*arg,double val, double dexp; int exp; size_t max_size = 1; - size_t size; + int size; int new_fmt = fmt; int fpe_was_unmasked; diff --git a/erts/lib_src/common/ethr_mutex.c b/erts/lib_src/common/ethr_mutex.c index e363279f2e..d8cd691e9d 100644 --- a/erts/lib_src/common/ethr_mutex.c +++ b/erts/lib_src/common/ethr_mutex.c @@ -692,7 +692,7 @@ write_lock_wait(struct ethr_mutex_base_ *mtxb, goto chk_spin; if (--until_yield == 0) { until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS; - ETHR_YIELD(); + (void) ETHR_YIELD(); } } @@ -711,7 +711,7 @@ write_lock_wait(struct ethr_mutex_base_ *mtxb, ETHR_SPIN_BODY; if (--until_yield == 0) { until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS; - ETHR_YIELD(); + (void) ETHR_YIELD(); } act = ethr_atomic32_read(&mtxb->flgs); scnt--; @@ -2161,7 +2161,7 @@ rwmutex_normal_rlock_wait(ethr_rwmutex *rwmtx, ethr_sint32_t initial) ETHR_SPIN_BODY; if (--until_yield == 0) { until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS; - ETHR_YIELD(); + (void) ETHR_YIELD(); } act = ethr_atomic32_read(&rwmtx->mtxb.flgs); scnt--; @@ -2288,7 +2288,7 @@ rwmutex_freqread_rlock_wait(ethr_rwmutex *rwmtx, ETHR_SPIN_BODY; if (--until_yield == 0) { until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS; - ETHR_YIELD(); + (void) ETHR_YIELD(); } act = ethr_atomic32_read(&rwmtx->mtxb.flgs); scnt--; -- cgit v1.2.3