Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
1148-erts-Silence-CodeChecker-for-empty-if-s.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1148-erts-Silence-CodeChecker-for-empty-if-s.patch of Package erlang
From ee5b0b13911825b877b08add9d57e7ed7a10ad52 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson <sverker@erlang.org> Date: Mon, 22 Feb 2021 20:55:33 +0100 Subject: [PATCH 08/10] erts: Silence CodeChecker for empty if's --- erts/emulator/nifs/common/erl_tracer_nif.c | 8 ++++---- erts/etc/common/inet_gethost.c | 12 +++--------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/erts/emulator/nifs/common/erl_tracer_nif.c b/erts/emulator/nifs/common/erl_tracer_nif.c index 0bde60d057..65b54a3582 100644 --- a/erts/emulator/nifs/common/erl_tracer_nif.c +++ b/erts/emulator/nifs/common/erl_tracer_nif.c @@ -241,14 +241,14 @@ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) msg = enif_make_binary(env, &bin); - if (!enif_port_command(env, &to_port, NULL, msg)) - /* port has probably died, enabled will clean up */; + (void) enif_port_command(env, &to_port, NULL, msg); + /* if failure: port has probably died, enabled will clean up */ enif_release_binary(&bin); } else { - if (!enif_send(env, &to_pid, NULL, msg)) - /* process has probably died, enabled will clean up */; + (void) enif_send(env, &to_pid, NULL, msg); + /* if failure: process has probably died, enabled will clean up */ } error: diff --git a/erts/etc/common/inet_gethost.c b/erts/etc/common/inet_gethost.c index 13b44ed0aa..164b773178 100644 --- a/erts/etc/common/inet_gethost.c +++ b/erts/etc/common/inet_gethost.c @@ -2586,9 +2586,7 @@ static void debugf(char *format, ...) WriteFile(debug_console_allocated,buff,strlen(buff),&res,NULL); } #else - /* suppress warning with 'if' */ - if(write(2,buff,strlen(buff))) - ; + (void) write(2,buff,strlen(buff)); #endif va_end(ap); } @@ -2610,9 +2608,7 @@ static void warning(char *format, ...) WriteFile(GetStdHandle(STD_ERROR_HANDLE),buff,strlen(buff),&res,NULL); } #else - /* suppress warning with 'if' */ - if(write(2,buff,strlen(buff))) - ; + (void) write(2,buff,strlen(buff)); #endif va_end(ap); } @@ -2634,9 +2630,7 @@ static IMPL_NORETURN__ fatal(char *format, ...) WriteFile(GetStdHandle(STD_ERROR_HANDLE),buff,strlen(buff),&res,NULL); } #else - /* suppress warning with 'if' */ - if(write(2,buff,strlen(buff))) - ; + (void) write(2,buff,strlen(buff)); #endif va_end(ap); #ifndef WIN32 -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor