Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
1255-erts-Fix-warning-about-bitwise-operations-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1255-erts-Fix-warning-about-bitwise-operations-on-boolean.patch of Package erlang
From c6bc1cdff90d83bd7477eb01c08e6da66950d927 Mon Sep 17 00:00:00 2001 From: Frej Drejhammar <frej.drejhammar@gmail.com> Date: Wed, 5 Apr 2023 15:57:22 +0200 Subject: [PATCH] erts: Fix warning about bitwise operations on booleans Clang 16 warns when `&` and `|` are used on boolean operands. --- erts/emulator/beam/dist.c | 2 +- erts/emulator/beam/erl_nif.c | 2 +- erts/emulator/beam/erl_process.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c index daf07e5fa7..f7efe780e7 100644 --- a/erts/emulator/beam/dist.c +++ b/erts/emulator/beam/dist.c @@ -4884,7 +4884,7 @@ BIF_RETTYPE setnode_2(BIF_ALIST_2) erts_thr_progress_block(); success = (!ERTS_PROC_IS_EXITING(net_kernel) - & !ERTS_PROC_GET_DIST_ENTRY(net_kernel)); + && !ERTS_PROC_GET_DIST_ENTRY(net_kernel)); if (success) { /* * Ensure we don't use a nodename-creation pair with diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index 086dfa95ad..acc20da991 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -2922,7 +2922,7 @@ void erts_nif_demonitored(ErtsResource* resource) ASSERT(resource->type->fn.down); erts_mtx_lock(&rmp->lock); - free_me = ((rmon_refc_dec_read(rmp) == 0) & !!rmon_is_dying(rmp)); + free_me = ((rmon_refc_dec_read(rmp) == 0) && !!rmon_is_dying(rmp)); erts_mtx_unlock(&rmp->lock); if (free_me) diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index d4502a8b1a..7242dcb577 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -7397,7 +7397,7 @@ static ERTS_INLINE int have_dirty_work(void) { return !(ERTS_EMPTY_RUNQ(ERTS_DIRTY_CPU_RUNQ) - | ERTS_EMPTY_RUNQ(ERTS_DIRTY_IO_RUNQ)); + || ERTS_EMPTY_RUNQ(ERTS_DIRTY_IO_RUNQ)); } #define ERTS_MSB_NONE_PRIO_BIT PORT_BIT -- 2.35.3
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