Skip to content

Commit

Permalink
Fix warning -Wparentheses
Browse files Browse the repository at this point in the history
Fix warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]

See merge request gysela-developpers/gyselalibxx!455

--------------------------------------------
  • Loading branch information
EmilyBourne committed Apr 10, 2024
1 parent 2c62f0d commit 044df67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cmake_tests:
rm -rf build || true
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-Wall -Werror=unused-variable -Wno-sign-compare" -DBUILD_BENCHMARKS=ON $GENERAL_CMAKE_OPTIONS -DKokkos_ENABLE_SERIAL=ON ..
cmake -DCMAKE_CXX_FLAGS="-Wall -Werror=unused-variable -Werror=parentheses -Wno-sign-compare" -DBUILD_BENCHMARKS=ON $GENERAL_CMAKE_OPTIONS -DKokkos_ENABLE_SERIAL=ON ..
make -j 4
ctest -j 2 --output-on-failure --timeout 5 -LE test_on_Release_only --output-junit tests.xml
artifacts:
Expand Down
4 changes: 2 additions & 2 deletions tests/geometryXVx/geometryMX/fluidspecies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ TEST(GeometryXM, KineticFluidSpecies)
EXPECT_EQ(ddc::discrete_space<IDimSp>().charges()(isp), kinetic_charges(isp));
EXPECT_EQ(ddc::discrete_space<IDimSp>().masses()(isp), kinetic_masses(isp));

} else if (nb_kinspecies + 1 <= isp.uid() < nb_kinspecies + nb_fluidspecies) {
} else if (nb_kinspecies + 1 <= isp.uid() && isp.uid() < nb_kinspecies + nb_fluidspecies) {
EXPECT_EQ(ddc::discrete_space<IDimSp>().charges()(isp), fluid_charges(isp));
EXPECT_EQ(ddc::discrete_space<IDimSp>().masses()(isp), fluid_masses(isp));
}
Expand Down Expand Up @@ -208,4 +208,4 @@ TEST(GeometryXM, KineticFluidAdiabaticSpecies)
EXPECT_EQ(ddc::discrete_space<IDimSp>().charges()(isp), charge_adiabspecies);
}
});
}
}

0 comments on commit 044df67

Please sign in to comment.