Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings reported when -Wpedantic is used #1512

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 3rdparty/clipper/clipper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4329,10 +4329,10 @@ double DistanceFromLineSqrd(
const IntPoint& pt, const IntPoint& ln1, const IntPoint& ln2)
{
//The equation of a line in general form (Ax + By + C = 0)
//given 2 points (x¹,y¹) & (x²,y²) is ...
//( - )x + ( - )y + ( - y¹)x¹ - ( - x¹)y¹ = 0
//A = ( - ); B = ( - ); C = ( - y¹)x¹ - ( - x¹)y¹
//perpendicular distance of point (x³,y³) = (Ax³ + By³ + C)/Sqrt(A² + B²)
//given 2 points (x1,y1) & (x1,y1) is ...
//(y1 - y1)x + (x1 - x1)y + (y1 - y1)x1 - (x1 - x1)y1 = 0
//A = (y1 - y1); B = (x2 - x1); C = (y2 - y1)x1 - (x2 - x1)y1
//perpendicular distance of point (x3,y3) = (Ax3 + By3 + C)/Sqrt(A*A + B*B)
//see http://en.wikipedia.org/wiki/Perpendicular_distance
double A = double(ln1.Y - ln2.Y);
double B = double(ln2.X - ln1.X);
Expand Down
3 changes: 2 additions & 1 deletion 3rdparty/simdlib/Simd/SimdBaseImageLoadPng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,4 +1148,5 @@ namespace Simd
}
}
}
}
}

3 changes: 2 additions & 1 deletion 3rdparty/simdlib/Simd/SimdBaseImageSaveJpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,4 +601,5 @@ namespace Simd
return NULL;
}
}
}
}

3 changes: 2 additions & 1 deletion 3rdparty/simdlib/Simd/SimdBaseImageSavePng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,5 @@ namespace Simd
WriteCrc32(_stream, 0);
}
}
}
}

20 changes: 10 additions & 10 deletions 3rdparty/simdlib/Simd/SimdLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ typedef unsigned __int64 uint64_t;
typedef enum
{
SimdFalse = 0, /*!< False value. */
SimdTrue = 1, /*!< True value. */
SimdTrue = 1 /*!< True value. */
} SimdBool;

/*! @ingroup c_types
Expand All @@ -91,7 +91,7 @@ typedef enum
/*! equal to: a < b */
SimdCompareLesser,
/*! equal to: a <= b */
SimdCompareLesserOrEqual,
SimdCompareLesserOrEqual
} SimdCompareType;

/*! @ingroup c_types
Expand All @@ -111,7 +111,7 @@ typedef enum
SimdCpuInfoAvx512bw, /*!< Availability of AVX-512BW (x86). */
SimdCpuInfoVmx, /*!< Availability of VMX or Altivec (PowerPC). */
SimdCpuInfoVsx, /*!< Availability of VSX (PowerPC). */
SimdCpuInfoNeon, /*!< Availability of NEON (ARM). */
SimdCpuInfoNeon /*!< Availability of NEON (ARM). */
} SimdCpuInfoType;

/*! @ingroup c_types
Expand All @@ -132,7 +132,7 @@ typedef enum
/*! A PNG (Portable Network Graphics) image file format. */
SimdImageFilePng,
/*! A JPEG (Joint Photographic Experts Group) image file format. */
SimdImageFileJpeg,
SimdImageFileJpeg
} SimdImageFileType;

/*! @ingroup c_types
Expand All @@ -158,7 +158,7 @@ typedef enum
/*! Subtracts unsigned 8-bit integer b from unsigned 8-bit integer a (for every channel of every point of the images). */
SimdOperationBinary8uSubtraction,
/*! Adds unsigned 8-bit integer b from unsigned 8-bit integer a (for every channel of every point of the images). */
SimdOperationBinary8uAddition,
SimdOperationBinary8uAddition
} SimdOperationBinary8uType;

/*! @ingroup c_types
Expand Down Expand Up @@ -189,7 +189,7 @@ typedef enum
/*! A 24-bit (3 8-bit channels) RGB (Red, Green, Blue) pixel format. */
SimdPixelFormatRgb24,
/*! A 32-bit (4 8-bit channels) RGBA (Red, Green, Blue, Alpha) pixel format. */
SimdPixelFormatRgba32,
SimdPixelFormatRgba32
} SimdPixelFormatType;

/*! @ingroup c_types
Expand All @@ -200,7 +200,7 @@ enum SimdReduceType
SimdReduce2x2, /*!< Using of function ::SimdReduceGray2x2 for image reducing. */
SimdReduce3x3, /*!< Using of function ::SimdReduceGray3x3 for image reducing. */
SimdReduce4x4, /*!< Using of function ::SimdReduceGray4x4 for image reducing. */
SimdReduce5x5, /*!< Using of function ::SimdReduceGray5x5 for image reducing. */
SimdReduce5x5 /*!< Using of function ::SimdReduceGray5x5 for image reducing. */
};

/*! @ingroup resizing
Expand All @@ -213,7 +213,7 @@ typedef enum
/*! 16-bit integer channel type. */
SimdResizeChannelShort,
/*! 32-bit float channel type. */
SimdResizeChannelFloat,
SimdResizeChannelFloat
} SimdResizeChannelType;

/*! @ingroup resizing
Expand All @@ -236,7 +236,7 @@ typedef enum
/*! Area method. */
SimdResizeMethodArea,
/*! Area method for previously reduced in 2 times image. */
SimdResizeMethodAreaFast,
SimdResizeMethodAreaFast
} SimdResizeMethodType;

/*! @ingroup yuv_conversion
Expand All @@ -248,7 +248,7 @@ typedef enum
SimdYuvBt601, /*!< Corresponds to BT.601 standard. Uses Kr=0.299, Kb=0.114. Restricts Y to range [16..235], U and V to [16..240]. */
SimdYuvBt709, /*!< Corresponds to BT.709 standard. Uses Kr=0.2126, Kb=0.0722. Restricts Y to range [16..235], U and V to [16..240]. */
SimdYuvBt2020, /*!< Corresponds to BT.2020 standard. Uses Kr=0.2627, Kb=0.0593. Restricts Y to range [16..235], U and V to [16..240]. */
SimdYuvTrect871, /*!< Corresponds to T-REC-T.871 standard. Uses Kr=0.299, Kb=0.114. Y, U and V use full range [0..255]. */
SimdYuvTrect871 /*!< Corresponds to T-REC-T.871 standard. Uses Kr=0.299, Kb=0.114. Y, U and V use full range [0..255]. */
} SimdYuvType;

// ViSP custom SIMD code
Expand Down
4 changes: 2 additions & 2 deletions 3rdparty/simdlib/Simd/SimdMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ namespace Simd
vst1q_f32(_a, a);
float r[4] = { 1.0f / _a[0], 1.0f / _a[1], 1.0f / _a[2], 1.0f / _a[3] };
return vld1q_f32(r);
};
}

template<> SIMD_INLINE float32x4_t Reciprocal<0>(const float32x4_t & a)
{
Expand Down Expand Up @@ -985,7 +985,7 @@ namespace Simd
vst1q_f32(_b, b);
float c[4] = { _a[0] / _b[0], _a[1] / _b[1], _a[2] / _b[2], _a[3] / _b[3] };
return vld1q_f32(c);
};
}

template <int iter> SIMD_INLINE float32x4_t ReciprocalSqrt(const float32x4_t & a);

Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/image/vpCannyEdgeDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void scaleFilter(
}
}
}
};
}
#endif

BEGIN_VISP_NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/image/vpImageCircle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ void incrementIfIsInMask(const vpImage<bool> &mask, const int &width, const int
++count;
}
}
};
}
#endif

unsigned int vpImageCircle::computePixelsInMask(const vpImage<bool> &mask) const
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/math/matrix/vpMatrix_mul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ END_VISP_NAMESPACE
#else
// Work around to avoid warning LNK4221: This object file does not define any
// previously undefined public symbols
void dummy_vpMatrix_blas() { };
void dummy_vpMatrix_blas() { }
#endif

#endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
2 changes: 1 addition & 1 deletion modules/vision/include/visp3/vision/vpPose.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class VISP_EXPORT vpPose
initialized by Dementhon approach */
LAGRANGE_VIRTUAL_VS, /*!< Non linear virtual visual servoing approach
initialized by Lagrange approach */
DEMENTHON_LAGRANGE_VIRTUAL_VS, /*!< Non linear virtual visual servoing approach
DEMENTHON_LAGRANGE_VIRTUAL_VS /*!< Non linear virtual visual servoing approach
initialized by either Dementhon or Lagrange approach,
depending on which method has the smallest residual. */
} vpPoseMethodType;
Expand Down
Loading