From: Holger Schemel Date: Thu, 20 Oct 2022 18:13:07 +0000 (+0200) Subject: removed shadowing of outer variable by local variable X-Git-Tag: 4.3.3.0~41 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=fb8bb677ad12b6b837192cb32a395b9e9c2bcdb6 removed shadowing of outer variable by local variable This issue was found by Cppcheck (static C/C++ code analysis tool). --- diff --git a/src/editor.c b/src/editor.c index 6c992e98..080c1761 100644 --- a/src/editor.c +++ b/src/editor.c @@ -14219,7 +14219,8 @@ static void HandleControlButtons(struct GadgetInfo *gi) id <= GADGET_ID_ELEMENTLIST_LAST) { int element_position = id - GADGET_ID_ELEMENTLIST_FIRST; - int new_element = editor_elements[element_position + element_shift]; + + new_element = editor_elements[element_position + element_shift]; if (IS_EDITOR_CASCADE(new_element)) {