aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/beam/beam_bp.c2
-rw-r--r--erts/emulator/beam/beam_load.c2
-rw-r--r--erts/emulator/beam/bif.c3
-rw-r--r--erts/emulator/beam/dist.c6
-rwxr-xr-xerts/emulator/beam/erl_bif_info.c4
-rw-r--r--erts/emulator/beam/erl_instrument.c4
-rw-r--r--erts/emulator/beam/external.c4
-rw-r--r--erts/emulator/beam/packet_parser.c6
-rw-r--r--erts/emulator/drivers/common/gzio.c5
-rw-r--r--erts/etc/common/erlexec.c8
-rw-r--r--erts/etc/common/inet_gethost.c9
-rw-r--r--erts/lib_src/common/erl_printf_format.c2
-rw-r--r--erts/lib_src/common/ethr_mutex.c8
13 files changed, 28 insertions, 35 deletions
diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c
index c1e11f6448..9b17de34ec 100644
--- a/erts/emulator/beam/beam_bp.c
+++ b/erts/emulator/beam/beam_bp.c
@@ -969,7 +969,7 @@ erts_trace_time_call(Process* c_p, BeamInstr* I, BpDataTime* bdt)
if (pbt == 0) {
/* First call of process to instrumented function */
pbt = Alloc(sizeof(process_breakpoint_time_t));
- (void *) ERTS_PROC_SET_CALL_TIME(c_p, ERTS_PROC_LOCK_MAIN, pbt);
+ (void) ERTS_PROC_SET_CALL_TIME(c_p, ERTS_PROC_LOCK_MAIN, pbt);
} else {
ASSERT(pbt->pc);
/* add time to previous code */
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index b51f076a5d..96f506c97c 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -5904,7 +5904,7 @@ erts_make_stub_module(Process* p, Eterm Mod, Eterm Beam, Eterm Info)
Eterm* tp;
Eterm func;
Eterm arity_term;
- Uint arity;
+ Sint arity;
Uint native_address;
Eterm op;
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 97c8114437..46f297fc4d 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -359,8 +359,7 @@ remote_demonitor(Process *c_p, DistEntry *dep, Eterm ref, Eterm to)
break;
default:
ASSERT(! "Invalid dsig prepare result");
- res = ERTS_DEMONITOR_INTERNAL_ERROR;
- break;
+ return ERTS_DEMONITOR_INTERNAL_ERROR;
}
#ifndef ERTS_SMP
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 64cd93a100..98d8481b53 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -2548,9 +2548,9 @@ BIF_RETTYPE setnode_2(BIF_ALIST_2)
/* By setting dist_entry==erts_this_dist_entry and DISTRIBUTION on
net_kernel do_net_exist will be called when net_kernel
is terminated !! */
- (void *) ERTS_PROC_SET_DIST_ENTRY(net_kernel,
- ERTS_PROC_LOCK_MAIN,
- erts_this_dist_entry);
+ (void) ERTS_PROC_SET_DIST_ENTRY(net_kernel,
+ ERTS_PROC_LOCK_MAIN,
+ erts_this_dist_entry);
erts_refc_inc(&erts_this_dist_entry->refc, 2);
net_kernel->flags |= F_DISTRIBUTION;
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index fabddffc68..3d51c17183 100755
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -3286,7 +3286,7 @@ BIF_RETTYPE erts_debug_get_internal_state_1(BIF_ALIST_1)
else if (ERTS_IS_ATOM_STR("next_pid", BIF_ARG_1)
|| ERTS_IS_ATOM_STR("next_port", BIF_ARG_1)) {
/* Used by node_container_SUITE (emulator) */
- Eterm res;
+ Sint res;
if (ERTS_IS_ATOM_STR("next_pid", BIF_ARG_1))
res = erts_ptab_test_next_id(&erts_proc, 0, 0);
else
@@ -3644,7 +3644,7 @@ BIF_RETTYPE erts_debug_set_internal_state_2(BIF_ALIST_2)
Uint next;
if (term_to_Uint(BIF_ARG_2, &next) != 0) {
- Eterm res;
+ Sint res;
if (ERTS_IS_ATOM_STR("next_pid", BIF_ARG_1))
res = erts_ptab_test_next_id(&erts_proc, 1, next);
diff --git a/erts/emulator/beam/erl_instrument.c b/erts/emulator/beam/erl_instrument.c
index 963c8b3c58..7f4349556c 100644
--- a/erts/emulator/beam/erl_instrument.c
+++ b/erts/emulator/beam/erl_instrument.c
@@ -775,8 +775,8 @@ Eterm erts_instr_get_memory_map(Process *proc)
ASSERT(hp + 3 == end_hp);
if (mem_anchor) {
- for (bp = mem_anchor; bp->next; bp = bp->next);
-
+ for (bp = mem_anchor; bp->next; bp = bp->next)
+ ;
ASSERT(org_mem_anchor);
org_mem_anchor->prev = bp;
bp->next = org_mem_anchor;
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c
index ab1065aaa1..126f242fc0 100644
--- a/erts/emulator/beam/external.c
+++ b/erts/emulator/beam/external.c
@@ -926,7 +926,7 @@ BIF_RETTYPE erts_debug_dist_ext_to_term_2(BIF_ALIST_2)
Eterm res;
Eterm *hp;
Eterm *hendp;
- Uint hsz;
+ Sint hsz;
ErtsDistExternal ede;
Eterm *tp;
Eterm real_bin;
@@ -972,7 +972,7 @@ BIF_RETTYPE erts_debug_dist_ext_to_term_2(BIF_ALIST_2)
if (hsz < 0)
goto badarg;
- hp = HAlloc(BIF_P, hsz);
+ hp = HAlloc(BIF_P, (Uint) hsz);
hendp = hp + hsz;
res = erts_decode_dist_ext(&hp, &MSO(BIF_P), &ede);
diff --git a/erts/emulator/beam/packet_parser.c b/erts/emulator/beam/packet_parser.c
index f1cfa8df39..1e301e3593 100644
--- a/erts/emulator/beam/packet_parser.c
+++ b/erts/emulator/beam/packet_parser.c
@@ -460,11 +460,9 @@ int packet_get_length(enum PacketParseType htype,
hp = (struct tpkt_head*) ptr;
if (hp->vrsn == TPKT_VRSN) {
plen = get_int16(hp->packet_length) - hlen;
- if (plen < 0)
- goto error;
- }
- else
+ } else {
goto error;
+ }
goto remain;
}
diff --git a/erts/emulator/drivers/common/gzio.c b/erts/emulator/drivers/common/gzio.c
index ca6d25adb4..e085c262b0 100644
--- a/erts/emulator/drivers/common/gzio.c
+++ b/erts/emulator/drivers/common/gzio.c
@@ -13,6 +13,7 @@
# include "config.h"
#endif
#include <stdio.h>
+#include <string.h> /* ssize_t on Mac OS X */
#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -314,7 +315,7 @@ local int get_byte(s)
if (s->z_eof) return EOF;
if (s->stream.avail_in == 0) {
#ifdef UNIX
- size_t res;
+ ssize_t res;
errno = 0;
res = ERTS_GZREAD(s->file, s->inbuf, Z_BUFSIZE);
if (res == 0) {
@@ -487,7 +488,7 @@ erts_gzread(gzFile file, voidp buf, unsigned len)
}
if (s->stream.avail_in == 0 && !s->z_eof) {
#ifdef UNIX
- size_t res;
+ ssize_t res;
errno = 0;
res = ERTS_GZREAD(s->file, s->inbuf, Z_BUFSIZE);
if (res == 0) {
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index d865164bb0..60d7c4ce02 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -184,7 +184,6 @@ void error(char* format, ...);
#if !defined(ERTS_HAVE_SMP_EMU)
static void usage_notsup(const char *switchname);
#endif
-static void usage_msg(const char *msg);
static char **build_args_from_env(char *env_var);
static char **build_args_from_string(char *env_var);
static void initial_argv_massage(int *argc, char ***argv);
@@ -1132,13 +1131,6 @@ usage_notsup(const char *switchname)
#endif
static void
-usage_msg(const char *msg)
-{
- fprintf(stderr, "%s\n", msg);
- usage_aux();
-}
-
-static void
usage_format(char *format, ...)
{
va_list args;
diff --git a/erts/etc/common/inet_gethost.c b/erts/etc/common/inet_gethost.c
index b9a0e6bde3..bef97862a3 100644
--- a/erts/etc/common/inet_gethost.c
+++ b/erts/etc/common/inet_gethost.c
@@ -2562,7 +2562,8 @@ static void debugf(char *format, ...)
}
#else
/* suppress warning with 'if' */
- if(write(2,buff,strlen(buff)));
+ if(write(2,buff,strlen(buff)))
+ ;
#endif
va_end(ap);
}
@@ -2585,7 +2586,8 @@ static void warning(char *format, ...)
}
#else
/* suppress warning with 'if' */
- if(write(2,buff,strlen(buff)));
+ if(write(2,buff,strlen(buff)))
+ ;
#endif
va_end(ap);
}
@@ -2608,7 +2610,8 @@ static void fatal(char *format, ...)
}
#else
/* suppress warning with 'if' */
- if(write(2,buff,strlen(buff)));
+ if(write(2,buff,strlen(buff)))
+ ;
#endif
va_end(ap);
#ifndef WIN32
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--;