Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
1146-erts-Silence-CodeChecker-on-empty-loops.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1146-erts-Silence-CodeChecker-on-empty-loops.patch of Package erlang
From ec665844a22c0a938c9d944736778df6d204a015 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson <sverker@erlang.org> Date: Mon, 22 Feb 2021 20:46:18 +0100 Subject: [PATCH 06/10] erts: Silence CodeChecker on empty loops --- erts/emulator/beam/erl_ao_firstfit_alloc.c | 12 ++++++++---- erts/emulator/beam/erl_bestfit_alloc.c | 3 ++- erts/emulator/sys/common/erl_mmap.c | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/erts/emulator/beam/erl_ao_firstfit_alloc.c b/erts/emulator/beam/erl_ao_firstfit_alloc.c index a11b762afe..e5b2fe41ca 100644 --- a/erts/emulator/beam/erl_ao_firstfit_alloc.c +++ b/erts/emulator/beam/erl_ao_firstfit_alloc.c @@ -603,9 +603,11 @@ rbt_delete(AOFF_RBTree_t** root, AOFF_RBTree_t* del) /* Find node to splice out */ if (!z->left || !z->right) y = z; - else + else { /* Set y to z:s successor */ - for(y = z->right; y->left; y = y->left); + for(y = z->right; y->left; y = y->left) + ; + } /* splice out y */ x = y->left ? y->left : y->right; spliced_is_black = IS_BLACK(y); diff --git a/erts/emulator/beam/erl_bestfit_alloc.c b/erts/emulator/beam/erl_bestfit_alloc.c index 0ae39596a3..3951113364 100644 --- a/erts/emulator/beam/erl_bestfit_alloc.c +++ b/erts/emulator/beam/erl_bestfit_alloc.c @@ -434,7 +434,8 @@ tree_delete(Allctr_t *allctr, Block_t *del) y = z; else /* Set y to z:s successor */ - for(y = z->right; y->left; y = y->left); + for (y = z->right; y->left; y = y->left) + ; /* splice out y */ x = y->left ? y->left : y->right; spliced_is_black = IS_BLACK(y); diff --git a/erts/emulator/sys/common/erl_mmap.c b/erts/emulator/sys/common/erl_mmap.c index 890adbb7cb..03e673dcf1 100644 --- a/erts/emulator/sys/common/erl_mmap.c +++ b/erts/emulator/sys/common/erl_mmap.c @@ -756,7 +756,8 @@ rbt_delete(RBTree* tree, RBTNode* del) y = z; else /* Set y to z:s successor */ - for(y = z->right; y->left; y = y->left); + for(y = z->right; y->left; y = y->left) + ; /* splice out y */ x = y->left ? y->left : y->right; spliced_is_black = IS_BLACK(y); -- 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