diff libinterp/corefcn/load-save.cc @ 20478:610c74748518

maint: Clean up code based on static analysis suggestions. * __dispatch__.cc (F__dispatch__): Eliminate unnecessary double check on (nargin > 0). * cellfun.cc (Fnum2cell): Eliminate duplicate else-if branch for array.is_object(). * load-save.cc: Eliminate unreachable else branch. Simplify else-if to simple else since condition is always true at this point. * matrix_type.cc (Fmatrix_type): Eliminate unnecessary check on 'str_type == upper' and just mark matrix as permuted when permutation matrix was given as input. * kpse.cc (set_end): remove unused variable and its usage in conditional.
author Rik <rik@octave.org>
date Fri, 14 Aug 2015 13:28:30 -0700
parents 6bc09e953927
children c6224b4e7774
line wrap: on
line diff
--- a/libinterp/corefcn/load-save.cc	Thu Aug 13 22:00:02 2015 -0700
+++ b/libinterp/corefcn/load-save.cc	Fri Aug 14 13:28:30 2015 -0700
@@ -400,7 +400,7 @@
 
       if (error_state || stream.eof () || name.empty ())
         break;
-      else if (! error_state && ! name.empty ())
+      else
         {
           if (tc.is_defined ())
             {
@@ -455,14 +455,6 @@
           else
             error ("load: unable to load variable '%s'", name.c_str ());
         }
-      else
-        {
-          if (count == 0)
-            error ("load: are you sure '%s' is an Octave data file?",
-                   orig_fname.c_str ());
-
-          break;
-        }
     }
 
   if (list_only && count)