[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()
- [lmi-commits] [lmi] master updated (be3de4b0 -> f8fac8dd), Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 55cc6938 01/24: Establish an initial blacklist of clang warnings, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 10a2b305 06/24: Remediate unreachable 'return' statements,
Greg Chicares <=
- [lmi-commits] [lmi] master 8c4089d6 02/24: Label a section for target-specific warnings, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 5de37ebf 07/24: Don't avoid a diagnostic that no longer arises, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 7524301d 08/24: Improve concinnity, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master fb7c030b 10/24: Work around clang '-Wno-unreachable-code-return', Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master a5e06004 14/24: Enable another clang warning, except for cgicc, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master c21d8849 12/24: Explain why certain clang warnings will remain disabled, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master e5eeed14 20/24: Explain why two more clang warnings are disabled, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master f8fac8dd 24/24: Explain why several more clang warnings are disabled, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 06f81a9c 05/24: Refine warning pragmata, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 32145870 03/24: Correct an inconsistency in a comment, Greg Chicares, 2022/07/08