lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 10a2b305 06/24: Remediate unreachable 'return


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 10a2b305 06/24: Remediate unreachable 'return' statements
Date: Fri, 8 Jul 2022 07:11:25 -0400 (EDT)

branch: master
commit 10a2b3054b3e838055fcea1c84d1d2651a7ba260
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Remediate unreachable 'return' statements
---
 input_xml_io.cpp | 6 +++++-
 main_wx_test.cpp | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/input_xml_io.cpp b/input_xml_io.cpp
index 73bda28d..759164f7 100644
--- a/input_xml_io.cpp
+++ b/input_xml_io.cpp
@@ -197,9 +197,13 @@ void Input::redintegrate_ex_ante
     if(class_version() == file_version)
         {
         // INPUT !! Next time the class version is updated,
-        // remove this 'goto' and its label.
+        // remove this 'goto' and its label, and restore the
+        // 'return' statement.
+#if 1
         goto jumper;
+#else // 0
         return;
+#endif // 0
         }
 
     // Prior to version 3, 'SolveType' distinguished:
diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index f11cb420..af62ad7d 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -751,7 +751,9 @@ bool SkeletonTest::StoreCurrentException()
         return true;
         }
 
-    return false;
+#if defined LMI_GCC
+    throw "Unreachable--silences a compiler diagnostic.";
+#endif // defined LMI_GCC
 }
 
 void SkeletonTest::RethrowStoredException()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]