changeset 20719:7c21b151b8b4

build: Fix warning messages from compiler. * file-editor.cc (switch_tab): Change input 'move' to 'movetab' to avoid shadowing variable in *this. * file-editor.h (switch_tab): Change input 'move' to 'movetab' in function prototype. * data.cc (get_sort_mode_option): Remove unused second input argn. * data.cc (issorted): Remove second arg from calls to get_sort_mode_option.
author Rik <rik@octave.org>
date Wed, 18 Nov 2015 22:31:29 -0800
parents d903cccb8de8
children b76162d57ead
files libgui/src/m-editor/file-editor.cc libgui/src/m-editor/file-editor.h libinterp/corefcn/data.cc
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc
+++ b/libgui/src/m-editor/file-editor.cc
@@ -2053,7 +2053,7 @@
 #endif
 }
 void
-file_editor::switch_tab (int direction, bool move)
+file_editor::switch_tab (int direction, bool movetab)
 {
   int tabs = _tab_widget->count ();
 
@@ -2066,10 +2066,10 @@
   if (new_pos < 0 || new_pos >= tabs)
     new_pos = new_pos - direction*tabs;
 
-  if (move)
+  if (movetab)
     {
 #ifdef HAVE_QTABWIDGET_SETMOVABLE
-      _tab_widget->tabBar ()->moveTab (old_pos,new_pos);
+      _tab_widget->tabBar ()->moveTab (old_pos, new_pos);
       _tab_widget->setCurrentIndex (old_pos);
       _tab_widget->setCurrentIndex (new_pos);
       focus ();
--- a/libgui/src/m-editor/file-editor.h
+++ b/libgui/src/m-editor/file-editor.h
@@ -269,7 +269,7 @@
 
   void toggle_preference (const QString& preference, bool def);
 
-  void switch_tab (int direction, bool move = false);
+  void switch_tab (int direction, bool movetab = false);
 
   bool editor_tab_has_focus ();
 
--- a/libinterp/corefcn/data.cc
+++ b/libinterp/corefcn/data.cc
@@ -6866,7 +6866,7 @@
 }
 
 static sortmode
-get_sort_mode_option (const octave_value& arg, const char *argn)
+get_sort_mode_option (const octave_value& arg)
 {
   // FIXME: we initialize to UNSORTED here to avoid a GCC warning
   // about possibly using sortmode uninitialized.
@@ -6926,13 +6926,13 @@
       octave_value mode_arg;
 
       if (nargin == 3)
-        smode = get_sort_mode_option (args(2), "third");
+        smode = get_sort_mode_option (args(2));
 
       std::string tmp = args(1).xstring_value ("issorted: second argument must be a string");
       if (tmp == "rows")
         by_rows = true;
       else
-        smode = get_sort_mode_option (args(1), "second");
+        smode = get_sort_mode_option (args(1));
     }
 
   octave_value arg = args(0);