Skip to content

Commit 1aa043c

Browse files
committed
fix clang warnings
1 parent 31edabd commit 1aa043c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

bindings/c/tests/BoundsCheckTest-c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ int main(const int argc, const char* const* argv) {
8383
long double lowerBound;
8484
check_status(
8585
mgis_bv_behaviour_get_lower_bound(&lowerBound, b, "YoungModulus"));
86-
check(fabs(lowerBound - yg_min) < eps * yg_min,
86+
check(fabsl(lowerBound - yg_min) < eps * yg_min,
8787
"invalid lower bound for 'YoungModulus'");
8888
int hasUpperBound;
8989
check_status(mgis_bv_behaviour_has_upper_bound(&hasUpperBound, b, "YoungModulus"));
9090
check(hasUpperBound, "'YoungModulus' shall have an upper bound");
9191
long double upperBound;
9292
check_status(
9393
mgis_bv_behaviour_get_upper_bound(&upperBound, b, "YoungModulus"));
94-
check(fabs(upperBound - yg_max) < eps * yg_max,
94+
check(fabsl(upperBound - yg_max) < eps * yg_max,
9595
"invalid upper bound for 'YoungModulus'");
9696
// physical bounds
9797
int hasPhysicalBounds;
@@ -103,7 +103,7 @@ int main(const int argc, const char* const* argv) {
103103
long double lowerPhysicalBound;
104104
check_status(mgis_bv_behaviour_get_lower_physical_bound(&lowerPhysicalBound,
105105
b, "YoungModulus"));
106-
check(fabs(lowerPhysicalBound) < eps * yg_min,
106+
check(fabsl(lowerPhysicalBound) < eps * yg_min,
107107
"invalid physical lower bound for 'YoungModulus'");
108108
int hasUpperPhysicalBound;
109109
check_status(mgis_bv_behaviour_has_upper_physical_bound(&hasUpperPhysicalBound, b, "YoungModulus"));

tests/LoadMaterialPropertyTest.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "MGIS/Raise.hxx"
2121
#include "MGIS/MaterialProperty/MaterialProperty.hxx"
2222

23-
bool success = true;
23+
static bool success = true;
2424

2525
static bool check(const bool b, const std::string_view msg) {
2626
if (!b) {

0 commit comments

Comments
 (0)