removed shadowing of outer variable by local variable
authorHolger Schemel <info@artsoft.org>
Thu, 20 Oct 2022 18:13:07 +0000 (20:13 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 20 Oct 2022 18:13:07 +0000 (20:13 +0200)
This issue was found by Cppcheck (static C/C++ code analysis tool).

src/editor.c

index 6c992e9883206ec9d66772c242482c6171788bcf..080c1761d73095360dd92d84a65b0a66c5f2be0e 100644 (file)
@@ -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))
        {