lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master da240e8 03/15: Eliminate a return code that w


From: Greg Chicares
Subject: [lmi-commits] [lmi] master da240e8 03/15: Eliminate a return code that was always zero
Date: Mon, 25 Jan 2021 09:58:04 -0500 (EST)

branch: master
commit da240e8de3d7a409b2e3ee796826dcfea2067561
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 e92ebc2..be3951d 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*[])
@@ -564,11 +562,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]