changeset 26390:aabee709c13a stable

annotation-dialog.cc: Fix static analyzer detected issues (bug #55347). * annotation-dialog.cc (set_gui_props): Eliminate else branch on 4-elements in "textbox" which isn't used in normal code, and could reference unitialized memory if it did.
author Rik <rik@octave.org>
date Wed, 02 Jan 2019 20:32:13 -0800
parents d0a061e6d70f
children 3774259dd114
files libgui/graphics/annotation-dialog.cc
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/annotation-dialog.cc	Wed Jan 02 20:10:34 2019 -0800
+++ b/libgui/graphics/annotation-dialog.cc	Wed Jan 02 20:32:13 2019 -0800
@@ -192,11 +192,8 @@
               ui->sb_width->setValue (position(2));
               ui->sb_height->setValue (position(3));
             }
-          else
-            {
-              ui->sb_width->setValue (position(2));
-              ui->sb_height->setValue (position(3));
-            }
+          // FIXME: Should there be an else branch here?
+          // In annotation.m "textbox" is forced to have a 4-elem vector.
         }
       else if (name == "string")
         {