Skip to content

Commit

Permalink
Merge pull request #1334 from fspindle/fix_fedora_25
Browse files Browse the repository at this point in the history
Fix warnings and testing on Fedora 25 and ciosx cdash ci
  • Loading branch information
fspindle authored Feb 15, 2024
2 parents b9b017f + 94bb8d7 commit 3d969f9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ vp_set_source_file_compile_flag(src/tools/histogram/vpHistogram.cpp -Wno-strict-
vp_set_source_file_compile_flag(src/image/vpFont.cpp -Wno-float-equal -Wno-strict-overflow)
# To avoid warnings with basisu_miniz.h such as:
# basisu_miniz.h:1184:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
vp_set_source_file_compile_flag(src/tools/vpIoTools.cpp -Wno-misleading-indentation)
vp_set_source_file_compile_flag(src/tools/file/vpIoTools.cpp -Wno-misleading-indentation -Wno-strict-aliasing -Wno-strict-overflow)
vp_set_source_file_compile_flag(src/munkres/vpMunkres.cpp /wd26812 /wd4244)
vp_set_source_file_compile_flag(test/image/testImageBinarise.cpp -Wno-strict-overflow)
vp_set_source_file_compile_flag(test/image/testImageOwnership.cpp -Wno-pessimizing-move)
Expand Down
4 changes: 2 additions & 2 deletions modules/core/src/image/vpImageCircle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ unsigned int vpImageCircle::computePixelsInMask(const vpImage<bool> &mask) const
// dTheta <= 1/r sin(theta) && dTheta <= 1/r cos(theta)
dthetaPos = std::min<float>(dthetaCosPos, dthetaSinPos);
}
else if (sin_theta == 0.f && cos_theta != 0.f) {
else if (vpMath::equal(sin_theta, 0.f) && (!vpMath::equal(cos_theta, 0.f))) {
// dTheta = -1 / r cos(theta) || dTheta = 1 / r cos(theta)
if (cos_theta > 0.f) {
dthetaPos = dthetaCosNeg;
Expand All @@ -1120,7 +1120,7 @@ unsigned int vpImageCircle::computePixelsInMask(const vpImage<bool> &mask) const
dthetaPos = dthetaCosPos;
}
}
else if (sin_theta != 0.f && cos_theta == 0.f) {
else if ((!vpMath::equal(sin_theta, 0.f)) && vpMath::equal(cos_theta, 0.f)) {
// dTheta = -1 / r sin(theta) || dTheta = 1 / r sin(theta)
if (sin_theta > 0.f) {
dthetaPos = dthetaSinNeg;
Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/src/vpCircleHoughTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ vpCircleHoughTransform::computeCenterCandidates()
int left = -1;
for (int x = 0; x < nbColsAccum; x++) {
if ((centersAccum[y][x] >= m_algoParams.m_centerMinThresh)
&& (centersAccum[y][x] == centerCandidatesMaxima[y][x])
&& (vpMath::equal(centersAccum[y][x], centerCandidatesMaxima[y][x]))
&& (centersAccum[y][x] > centersAccum[y][x + 1])
) {
if (left < 0) {
Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/src/vpContours.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ bool isHoleBorderStart(const vpImage<int> &I, unsigned int i, unsigned int j)

void getContoursList(const vp::vpContour &root, int level, vp::vpContour &contour_list)
{
if (level > 0) {
if (level > 0 && level < std::numeric_limits<int>::max()) {
vp::vpContour *contour_node = new vp::vpContour;
contour_node->m_contourType = root.m_contourType;
contour_node->m_points = root.m_points;
Expand Down
3 changes: 3 additions & 0 deletions modules/sensor/test/force-torque/testForceTorqueAti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ void scopeFunction(std::mutex &mutex_data, std::mutex &mutex_state, t_shared_dat
scope.setLegend(1, 0, "x");
scope.setLegend(1, 1, "y");
scope.setLegend(1, 2, "z");
#else
(void)mutex_data;
(void)s_shared_data;
#endif

t_shared_data shared_data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ bool run(const std::string &input_directory, bool opt_click_allowed, bool opt_di
// Take the highest thresholds between all CI machines
#ifdef VISP_HAVE_COIN3D
map_thresh[vpMbGenericTracker::EDGE_TRACKER] =
useScanline ? std::pair<double, double>(0.005, 3.9) : std::pair<double, double>(0.007, 3.9);
useScanline ? std::pair<double, double>(0.005, 5.) : std::pair<double, double>(0.007, 3.9);
#if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO)
map_thresh[vpMbGenericTracker::KLT_TRACKER] =
useScanline ? std::pair<double, double>(0.007, 1.9) : std::pair<double, double>(0.007, 1.8);
Expand All @@ -382,7 +382,7 @@ bool run(const std::string &input_directory, bool opt_click_allowed, bool opt_di
#endif
#else
map_thresh[vpMbGenericTracker::EDGE_TRACKER] =
useScanline ? std::pair<double, double>(0.008, 2.3) : std::pair<double, double>(0.009, 4.0);
useScanline ? std::pair<double, double>(0.01, 2.5) : std::pair<double, double>(0.009, 4.0);
#if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO)
map_thresh[vpMbGenericTracker::KLT_TRACKER] =
useScanline ? std::pair<double, double>(0.006, 1.7) : std::pair<double, double>(0.005, 1.4);
Expand Down

0 comments on commit 3d969f9

Please sign in to comment.