# HG changeset patch # User John W. Eaton # Date 1450303612 18000 # Node ID 8ddb11c0b1f82167e36099bc17ae1b2dbd79b1f5 # Parent a3359fe50966d2c4938d4ef2d38d0e873ab9b7c1 restore return statements after calls to octave_base_stream::error Unlike the global error function, the octave_base_stream::error function simply sets some internal class error info and does return. * oct-fstrm.cc, oct-stream.cc, oct-strstrm.cc: Rstore return statements after calls to octave_base_stream::error. diff -r a3359fe50966 -r 8ddb11c0b1f8 libinterp/corefcn/oct-fstrm.cc --- a/libinterp/corefcn/oct-fstrm.cc Wed Dec 16 17:02:23 2015 -0500 +++ b/libinterp/corefcn/oct-fstrm.cc Wed Dec 16 17:06:52 2015 -0500 @@ -65,6 +65,7 @@ octave_fstream::seek (off_t, int) { error ("fseek: invalid_operation"); + return -1; } // Return current stream position. @@ -73,6 +74,7 @@ octave_fstream::tell (void) { error ("ftell: invalid_operation"); + return -1; } // Return nonzero if EOF has been reached on this stream. diff -r a3359fe50966 -r 8ddb11c0b1f8 libinterp/corefcn/oct-stream.cc --- a/libinterp/corefcn/oct-stream.cc Wed Dec 16 17:02:23 2015 -0500 +++ b/libinterp/corefcn/oct-stream.cc Wed Dec 16 17:06:52 2015 -0500 @@ -2609,6 +2609,8 @@ default: error ("%s: invalid format specifier", who.c_str ()); + return -1; + break; } } diff -r a3359fe50966 -r 8ddb11c0b1f8 libinterp/corefcn/oct-strstrm.cc --- a/libinterp/corefcn/oct-strstrm.cc Wed Dec 16 17:02:23 2015 -0500 +++ b/libinterp/corefcn/oct-strstrm.cc Wed Dec 16 17:06:52 2015 -0500 @@ -32,6 +32,7 @@ octave_base_strstream::seek (off_t, int) { error ("fseek: invalid operation"); + return -1; } // Return current stream position. @@ -40,6 +41,7 @@ octave_base_strstream::tell (void) { error ("ftell: invalid operation"); + return -1; } octave_stream