mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
build: GCC12 warnings
This commit is contained in:
parent
766f58ed7e
commit
89f8d4ae12
4
3rdparty/libpng/CMakeLists.txt
vendored
4
3rdparty/libpng/CMakeLists.txt
vendored
@ -77,7 +77,9 @@ endif(MSVC)
|
||||
add_library(${PNG_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||
target_link_libraries(${PNG_LIBRARY} ${ZLIB_LIBRARIES})
|
||||
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wundef -Wcast-align -Wimplicit-fallthrough -Wunused-parameter -Wsign-compare)
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wundef -Wcast-align -Wimplicit-fallthrough -Wunused-parameter -Wsign-compare
|
||||
-Wmaybe-uninitialized
|
||||
)
|
||||
|
||||
set_target_properties(${PNG_LIBRARY}
|
||||
PROPERTIES OUTPUT_NAME ${PNG_LIBRARY}
|
||||
|
3
3rdparty/libtiff/CMakeLists.txt
vendored
3
3rdparty/libtiff/CMakeLists.txt
vendored
@ -452,8 +452,9 @@ ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-protot
|
||||
-Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
|
||||
-Wmisleading-indentation
|
||||
-Wimplicit-fallthrough
|
||||
-Wunused-parameter # clang
|
||||
-Warray-parameter
|
||||
)
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter -Wmissing-prototypes
|
||||
-Wundef # tiffiop.h: #if __clang_major__ >= 4
|
||||
)
|
||||
|
@ -252,7 +252,7 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
|
||||
fs << "}";
|
||||
}
|
||||
// save current stage
|
||||
char buf[10];
|
||||
char buf[32];
|
||||
sprintf(buf, "%s%d", "stage", i );
|
||||
string stageFilename = dirName + buf + ".xml";
|
||||
FileStorage fs( stageFilename, FileStorage::WRITE );
|
||||
|
@ -8716,7 +8716,7 @@ static void StackLowerThanAddress(const void* ptr, bool* result) {
|
||||
// Make sure AddressSanitizer does not tamper with the stack here.
|
||||
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
|
||||
static bool StackGrowsDown() {
|
||||
int dummy;
|
||||
int dummy = 0;
|
||||
bool result;
|
||||
StackLowerThanAddress(&dummy, &result);
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user