Building rsgislib on Mac with AppleClang 15 produces some 70 cases of -Wbitwise-instead-of-logical compiler warnings.
Eg.:
|
if(gsl_matrix_get(inMatrix, 0, 1) == 0 & gsl_matrix_get(inMatrix, 1, 0) == 0) |
/opt/local/var/macports/build/_Users_nilason_ports_gis_rsgislib/rsgislib/work/rsgislib-5.1.7/src/math/RSGISMatrices.cpp:259:6: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
if(gsl_matrix_get(inMatrix, 0, 1) == 0 & gsl_matrix_get(inMatrix, 1, 0) == 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&&
/opt/local/var/macports/build/_Users_nilason_ports_gis_rsgislib/rsgislib/work/rsgislib-5.1.7/src/math/RSGISMatrices.cpp:259:6: note: cast one or both operands to int to silence this warning
See complete build log: rsgislib_build.log
I figure it would be preferable to address theses warnings as to not cause unexpected behaviour.
Building rsgislib on Mac with AppleClang 15 produces some 70 cases of
-Wbitwise-instead-of-logicalcompiler warnings.Eg.:
rsgislib/src/math/RSGISMatrices.cpp
Line 259 in 247e740
See complete build log: rsgislib_build.log
I figure it would be preferable to address theses warnings as to not cause unexpected behaviour.