diff --git a/Number_types/test/Number_types/Lazy_exact_nt.cpp b/Number_types/test/Number_types/Lazy_exact_nt.cpp index 8eea32ef7bd..d96d188dc6e 100644 --- a/Number_types/test/Number_types/Lazy_exact_nt.cpp +++ b/Number_types/test/Number_types/Lazy_exact_nt.cpp @@ -193,7 +193,9 @@ int main () q>q; q>r; r>q; q>1; 1>q; q<=q; q<=r; r<=q; q<=1; 1<=q; q>=q; q>=r; r>=q; q>=1; 1>=q; - bool b = q==q; b = q==r; b = r==q; b = q==1; b = 1==q; + + bool b; // avoid clang warning: equality comparison result unused [-Wunused-comparison] + b = q==q; b = q==r; b = r==q; b = q==1; b = 1==q; b = q!=q; b = q!=r; b = r!=q; b = q!=1; b = 1!=q; // Test comparisons with double. diff --git a/Number_types/test/Number_types/Quotient.cpp b/Number_types/test/Number_types/Quotient.cpp index e461f00d214..aa00feeccf9 100644 --- a/Number_types/test/Number_types/Quotient.cpp +++ b/Number_types/test/Number_types/Quotient.cpp @@ -3,6 +3,7 @@ // Sylvain Pion #include +#include #include #include #ifdef CGAL_USE_GMP @@ -52,10 +53,13 @@ void test_comparison_operators() -q; qq; q>r; r>q; q>1; 1>q; - q<=q; q<=r; r<=q; q<=1; 1<=q; + + bool b; // avoid clang warning: equality comparison result unused [-Wunused-comparison] + b = q<=q; b = q<=r; b = r<=q; b = q<=1; b = 1<=q; q>=q; q>=r; r>=q; q>=1; 1>=q; - q==q; q==r; r==q; q==1; 1==q; - q!=q; q!=r; r!=q; q!=1; 1!=q; + b = q==q; b = q==r; b = r==q; b = q==1; b = 1==q; + b = q!=q; b = q!=r; b = r!=q; b = q!=1; b = 1!=q; + CGAL_USE(b); } int main()