Compare commits

...

4 Commits

Author SHA1 Message Date
Daniel Lemire
937198691a
Merge pull request #389 from correctmost/cm/remove-unreachable-return
Remove an unreachable return statement
2026-06-09 11:18:15 -04:00
Daniel Lemire
0352ba3fef
Merge pull request #390 from correctmost/cm/remove-unreachable-block
Remove an else if statement that is always false
2026-06-09 11:17:35 -04:00
correctmost
6ae691372f Remove an else if statement that is always false
Commit b334317d added the same std::isnan(v) check as an earlier
condition.

The warning was reported by cppcheck.
2026-06-09 03:48:54 -04:00
correctmost
8fe7a9405b Remove an unreachable return statement
The redundant statement was reported by cppcheck.
2026-06-09 03:37:58 -04:00
2 changed files with 1 additions and 8 deletions

View File

@ -65,6 +65,4 @@ int main() {
#endif
std::cout << "All tests passed successfully." << std::endl;
return EXIT_SUCCESS;
return 0;
}
}

View File

@ -45,11 +45,6 @@ void all_32bit_values() {
std::cerr << "I got " << std::hexfloat << result_value
<< " but I was expecting " << v << std::endl;
abort();
} else if (std::isnan(v)) {
if (!std::isnan(result_value)) {
std::cerr << "not nan" << buffer << std::endl;
abort();
}
} else if (result_value != v) {
std::cerr << "no match ? " << buffer << std::endl;
std::cout << "started with " << std::hexfloat << v << std::endl;