diff --git a/examples/codepage-conv/duk_codepage_conv.c b/examples/codepage-conv/duk_codepage_conv.c index 932e9a60..315f0420 100644 --- a/examples/codepage-conv/duk_codepage_conv.c +++ b/examples/codepage-conv/duk_codepage_conv.c @@ -23,7 +23,7 @@ void duk_decode_string_codepage(duk_context *ctx, const char *str, size_t len, u tmplen = 3 * len; /* max expansion is 1 input byte -> 3 output bytes */ if (tmplen / 3 != len) { /* Temporary buffer length wraps. */ - duk_error(ctx, DUK_ERR_RANGE_ERROR, "input string too long"); + (void) duk_error(ctx, DUK_ERR_RANGE_ERROR, "input string too long"); return; } diff --git a/examples/eventloop/c_eventloop.c b/examples/eventloop/c_eventloop.c index 2b07cf86..11614391 100644 --- a/examples/eventloop/c_eventloop.c +++ b/examples/eventloop/c_eventloop.c @@ -201,7 +201,7 @@ static void expire_timers(duk_context *ctx) { fflush(stderr); #endif if (timer_count >= MAX_TIMERS) { - duk_error(ctx, DUK_ERR_RANGE_ERROR, "out of timer slots"); + (void) duk_error(ctx, DUK_ERR_RANGE_ERROR, "out of timer slots"); } memcpy((void *) (timer_list + timer_count), (void *) t, sizeof(ev_timer)); timer_count++; @@ -419,7 +419,7 @@ static int create_timer(duk_context *ctx) { oneshot = duk_require_boolean(ctx, 2); if (timer_count >= MAX_TIMERS) { - duk_error(ctx, DUK_ERR_RANGE_ERROR, "out of timer slots"); + (void) duk_error(ctx, DUK_ERR_RANGE_ERROR, "out of timer slots"); } idx = timer_count++; timer_id = timer_next_id++; @@ -574,7 +574,7 @@ static int listen_fd(duk_context *ctx) { #endif if (poll_count >= MAX_FDS) { - duk_error(ctx, DUK_ERR_ERROR, "out of fd slots"); + (void) duk_error(ctx, DUK_ERR_ERROR, "out of fd slots"); } pfd = poll_list + poll_count; diff --git a/examples/eventloop/poll.c b/examples/eventloop/poll.c index c78745d2..a32b8830 100644 --- a/examples/eventloop/poll.c +++ b/examples/eventloop/poll.c @@ -52,7 +52,7 @@ static int poll_poll(duk_context *ctx) { /*rc = ppoll(fds, n, &ts, NULL);*/ rc = poll(fds, n, timeout); if (rc < 0) { - duk_error(ctx, DUK_ERR_ERROR, "%s (errno=%d)", strerror(errno), errno); + (void) duk_error(ctx, DUK_ERR_ERROR, "%s (errno=%d)", strerror(errno), errno); } duk_push_array(ctx); diff --git a/examples/eventloop/socket.c b/examples/eventloop/socket.c index 18c24bc8..055e3802 100644 --- a/examples/eventloop/socket.c +++ b/examples/eventloop/socket.c @@ -17,7 +17,7 @@ #include "duktape.h" #define ERROR_FROM_ERRNO(ctx) do { \ - duk_error(ctx, DUK_ERR_ERROR, "%s (errno=%d)", strerror(errno), errno); \ + (void) duk_error(ctx, DUK_ERR_ERROR, "%s (errno=%d)", strerror(errno), errno); \ } while (0) static void set_nonblocking(duk_context *ctx, int fd) { @@ -96,7 +96,7 @@ static int socket_create_server_socket(duk_context *ctx) { break; } if (!addr_inet) { - duk_error(ctx, DUK_ERR_ERROR, "cannot resolve %s", addr); + (void) duk_error(ctx, DUK_ERR_ERROR, "cannot resolve %s", addr); } memset(&sockaddr, 0, sizeof(sockaddr)); @@ -204,7 +204,7 @@ static int socket_connect(duk_context *ctx) { break; } if (!addr_inet) { - duk_error(ctx, DUK_ERR_ERROR, "cannot resolve %s", addr); + (void) duk_error(ctx, DUK_ERR_ERROR, "cannot resolve %s", addr); } memset(&sockaddr, 0, sizeof(sockaddr));