-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
build warnings with latest compiler #21911
Copy link
Copy link
Closed
Labels
Milestone
Description
System information (version)
- OpenCV => 4.x branch
- Operating System / Platform => CentOS Linux release 7.9.2009
- Compiler => Clang 15.0.0
Detailed description
Hi experts:
After upgrading the compiler to the latest, a huge number of warnings came out.
there are four kinds of warnings:
evaluation.cpp:317:21: warning: definition of implicit copy constructor for 'UsedFinder' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
UsedFinder& operator=(const UsedFinder&) = delete;
pngrutil.c:3555:20: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]
png_isaligned(sp, png_uint_16) &&
pngread.c:3455:26: warning: variable 'row' set but not used [-Wunused-but-set-variable]
png_bytep row = png_voidcast(png_bytep, display->first_row);
jitprofiling.c:162:71: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive()
There are too many warnings that let me feel uncomfortable.
Is it necessary to remove the warnings by changing the source code?
Or we can just add compile flags to suppress these warnings?
Steps to reproduce
just use the latest clang compiler to build OpenCV project.
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found any solution - I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable