lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/004 34326d6 04/11: Eliminate a return code t


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/004 34326d6 04/11: Eliminate a return code that was always zero
Date: Sun, 20 Dec 2020 17:40:09 -0500 (EST)

branch: valyuta/004
commit 34326d611fc73bfe705b17ad96334cbd8772a769
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Eliminate a return code that was always zero
---
 round_to_test.cpp | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/round_to_test.cpp b/round_to_test.cpp
index da411e9..1950a7e 100644
--- a/round_to_test.cpp
+++ b/round_to_test.cpp
@@ -453,7 +453,7 @@ void test_rounding()
     // rigorous bounds, both overall and for each step.
 }
 
-int test_all_modes(bool synchronize)
+void test_all_modes(bool synchronize)
 {
     // As stated above, we'd like this to be true for all
     // floating-point types:
@@ -511,8 +511,6 @@ int test_all_modes(bool synchronize)
         << std::endl
         ;
     test_rounding();
-
-    return 0;
 }
 
 int test_main(int, char*[])
@@ -571,11 +569,9 @@ int test_main(int, char*[])
     // The software default rounding style and the hardware rounding
     // mode may be either synchronized or not, so test both ways.
     std::cout << "  Default style synchronized to hardware mode:\n";
-    bool rc = test_all_modes(true);
+    test_all_modes(true);
     std::cout << "  Default style NOT synchronized to hardware mode:\n";
-    // Use '+' rather than '||' to avoid short-circuit evaluation,
-    // so that failure on one test doesn't prevent downstream tests
-    // from being run.
-    rc = rc + test_all_modes(false);
-    return rc;
+    test_all_modes(false);
+
+    return EXIT_SUCCESS;
 }



reply via email to

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