changeset 23238:3de5efeffb86

Eliminate compilation warnings related to clean_up_and_exit fcn (bug #50265). * quit.h (octave_throw_exit_exception): New prototype. * quit.cc (octave_throw_exit_exception): New function * quit.cc (octave_rethrow_exception): Call octave_throw_exit_exception rather than deprecated clean_up_and_exit.
author John W. Eaton <jwe@octave.org>
date Sun, 26 Feb 2017 07:48:45 -0800
parents 904c8a356e76
children 6c691829a24d
files liboctave/cruft/misc/quit.cc liboctave/cruft/misc/quit.h
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/cruft/misc/quit.cc	Sun Feb 26 13:46:52 2017 +0100
+++ b/liboctave/cruft/misc/quit.cc	Sun Feb 26 07:48:45 2017 -0800
@@ -85,6 +85,14 @@
 }
 
 void
+octave_throw_exit_exception (int exit_status, int safe_to_return)
+{
+  octave_exception_state = octave_quit_exception;
+
+  throw octave_exit_exception (exit_status, safe_to_return);
+}
+
+void
 octave_rethrow_exception (void)
 {
   if (octave_interrupt_state)
@@ -105,8 +113,8 @@
           break;
 
         case octave_quit_exception:
-          clean_up_and_exit (octave_exit_exception_status,
-                             octave_exit_exception_safe_to_return);
+          octave_throw_exit_exception (octave_exit_exception_status,
+                                       octave_exit_exception_safe_to_return);
           break;
 
         default:
--- a/liboctave/cruft/misc/quit.h	Sun Feb 26 13:46:52 2017 +0100
+++ b/liboctave/cruft/misc/quit.h	Sun Feb 26 07:48:45 2017 -0800
@@ -189,6 +189,9 @@
 
 OCTAVE_NORETURN OCTAVE_API extern void octave_throw_bad_alloc (void);
 
+OCTAVE_NORETURN OCTAVE_API extern void
+octave_throw_exit_exception (int exit_status, int safe_to_return);
+
 OCTAVE_API extern void octave_rethrow_exception (void);
 
 #if defined (__cplusplus)