diff --git a/src/lib/Iex/IexThrowErrnoExc.cpp b/src/lib/Iex/IexThrowErrnoExc.cpp index 3d2e3c2864..057d311bb6 100644 --- a/src/lib/Iex/IexThrowErrnoExc.cpp +++ b/src/lib/Iex/IexThrowErrnoExc.cpp @@ -18,7 +18,10 @@ #ifdef _WIN32 #include -#pragma warning (disable : 4996) +#endif + +#ifdef _MSC_VER + #pragma warning (disable : 4996) #endif IEX_INTERNAL_NAMESPACE_SOURCE_ENTER diff --git a/src/lib/OpenEXR/ImfKeyCode.h b/src/lib/OpenEXR/ImfKeyCode.h index 15fc9c2466..4916797afd 100644 --- a/src/lib/OpenEXR/ImfKeyCode.h +++ b/src/lib/OpenEXR/ImfKeyCode.h @@ -90,7 +90,6 @@ class IMF_EXPORT_TYPE KeyCode IMF_EXPORT KeyCode (const KeyCode &other); - IMF_EXPORT ~KeyCode() = default; IMF_EXPORT KeyCode & operator = (const KeyCode &other); diff --git a/src/lib/OpenEXRCore/decoding.c b/src/lib/OpenEXRCore/decoding.c index f9a4272d65..cf7709d17a 100644 --- a/src/lib/OpenEXRCore/decoding.c +++ b/src/lib/OpenEXRCore/decoding.c @@ -306,7 +306,7 @@ default_decompress_chunk (exr_decode_pipeline_t* decode) return pctxt->print_error ( pctxt, rv, - "Unable to decompress sample table %lu -> %lu", + "Unable to decompress sample table %llu -> %zu", decode->chunk.sample_count_table_size, sampsize); } @@ -328,7 +328,7 @@ default_decompress_chunk (exr_decode_pipeline_t* decode) return pctxt->print_error ( pctxt, rv, - "Unable to decompress image data %lu -> %lu", + "Unable to decompress image data %llu -> %llu", decode->chunk.packed_size, decode->chunk.unpacked_size); } diff --git a/src/lib/OpenEXRCore/internal_win32_file_impl.h b/src/lib/OpenEXRCore/internal_win32_file_impl.h index 49531fc5de..82c7d65a7b 100644 --- a/src/lib/OpenEXRCore/internal_win32_file_impl.h +++ b/src/lib/OpenEXRCore/internal_win32_file_impl.h @@ -61,9 +61,9 @@ print_error_helper ( if (error_cb) error_cb ( - (exr_const_context_t) pf, errcode, (const char*) lpDisplayBuf); + (exr_const_context_t) pf, errcode, "%s", (const char*) lpDisplayBuf); else - pf->print_error (pf, errcode, (const char*) lpDisplayBuf); + pf->print_error (pf, errcode, "%s", (const char*) lpDisplayBuf); LocalFree (lpMsgBuf); LocalFree (lpDisplayBuf); diff --git a/src/lib/OpenEXRCore/unpack.c b/src/lib/OpenEXRCore/unpack.c index 2abf4b308c..ecb77d6a11 100644 --- a/src/lib/OpenEXRCore/unpack.c +++ b/src/lib/OpenEXRCore/unpack.c @@ -9,6 +9,7 @@ #include "openexr_attr.h" #include +#include #if defined(__x86_64__) || defined(_M_X64) # ifndef _WIN32 diff --git a/src/test/IexTest/CMakeLists.txt b/src/test/IexTest/CMakeLists.txt index a26212b916..f069c61341 100644 --- a/src/test/IexTest/CMakeLists.txt +++ b/src/test/IexTest/CMakeLists.txt @@ -13,4 +13,6 @@ set_target_properties(IexTest PROPERTIES if(WIN32 AND BUILD_SHARED_LIBS) target_compile_definitions(IexTest PRIVATE OPENEXR_DLL) endif() -add_test(NAME OpenEXR.Iex COMMAND $) + +# CMAKE_CROSSCOMPILING_EMULATOR is necessary to support cross-compiling (ex: to win32 from mingw and running tests with wine) +add_test(NAME OpenEXR.Iex COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $) diff --git a/src/test/OpenEXRCoreTest/CMakeLists.txt b/src/test/OpenEXRCoreTest/CMakeLists.txt index 6efdbdc5eb..13f4603309 100644 --- a/src/test/OpenEXRCoreTest/CMakeLists.txt +++ b/src/test/OpenEXRCoreTest/CMakeLists.txt @@ -40,10 +40,10 @@ if(WIN32 AND (BUILD_SHARED_LIBS OR OPENEXR_BUILD_BOTH_STATIC_SHARED)) target_compile_definitions(CorePerfTest PRIVATE OPENEXR_DLL) endif() -#add_test(NAME OpenEXR.Core COMMAND $) function(DEFINE_OPENEXRCORE_TESTS) foreach(curtest IN LISTS ARGN) - add_test(NAME OpenEXRCore.${curtest} COMMAND $ ${curtest}) + # CMAKE_CROSSCOMPILING_EMULATOR is necessary to support cross-compiling (ex: to win32 from mingw and running tests with wine) + add_test(NAME OpenEXRCore.${curtest} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${curtest}) endforeach() endfunction() diff --git a/src/test/OpenEXRFuzzTest/CMakeLists.txt b/src/test/OpenEXRFuzzTest/CMakeLists.txt index 75ba3a59eb..a1b650b108 100644 --- a/src/test/OpenEXRFuzzTest/CMakeLists.txt +++ b/src/test/OpenEXRFuzzTest/CMakeLists.txt @@ -18,7 +18,8 @@ if(OPENEXR_RUN_FUZZ_TESTS) function(DEFINE_OPENEXR_FUZZ_TESTS) foreach(curtest IN LISTS ARGN) - add_test(NAME OpenEXR.Fuzz.${curtest} COMMAND $ ${curtest}) + # CMAKE_CROSSCOMPILING_EMULATOR is necessary to support cross-compiling (ex: to win32 from mingw and running tests with wine) + add_test(NAME OpenEXR.Fuzz.${curtest} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${curtest}) set_tests_properties(OpenEXR.Fuzz.${curtest} PROPERTIES TIMEOUT 36000) endforeach() endfunction() @@ -28,8 +29,6 @@ endfunction() testFuzzDeepScanLines testFuzzDeepTiles ) - #add_test(NAME OpenEXR.Fuzz COMMAND $) - #set_tests_properties(OpenEXR.Fuzz PROPERTIES TIMEOUT 36000) add_custom_target(fuzz $) add_dependencies(fuzz OpenEXRFuzzTest) diff --git a/src/test/OpenEXRTest/CMakeLists.txt b/src/test/OpenEXRTest/CMakeLists.txt index ebd3428356..9dd74d1a7b 100644 --- a/src/test/OpenEXRTest/CMakeLists.txt +++ b/src/test/OpenEXRTest/CMakeLists.txt @@ -74,14 +74,10 @@ if(WIN32 AND BUILD_SHARED_LIBS) target_compile_definitions(OpenEXRTest PRIVATE OPENEXR_DLL) endif() -#add_test(NAME OpenEXR.Core COMMAND $ core) -#add_test(NAME OpenEXR.Basic COMMAND $ basic) -#add_test(NAME OpenEXR.Deep COMMAND $ deep) -#add_test(NAME OpenEXR.Multi COMMAND $ multi) - function(DEFINE_OPENEXR_TESTS) foreach(curtest IN LISTS ARGN) - add_test(NAME OpenEXR.${curtest} COMMAND $ ${curtest}) + # CMAKE_CROSSCOMPILING_EMULATOR is necessary to support cross-compiling (ex: to win32 from mingw and running tests with wine) + add_test(NAME OpenEXR.${curtest} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${curtest}) endforeach() endfunction() diff --git a/src/test/OpenEXRUtilTest/CMakeLists.txt b/src/test/OpenEXRUtilTest/CMakeLists.txt index 8eb80cdc75..2f4cafc18a 100644 --- a/src/test/OpenEXRUtilTest/CMakeLists.txt +++ b/src/test/OpenEXRUtilTest/CMakeLists.txt @@ -17,10 +17,10 @@ endif() function(DEFINE_OPENEXR_UTIL_TESTS) foreach(curtest IN LISTS ARGN) - add_test(NAME OpenEXRUtil.${curtest} COMMAND $ ${curtest}) + # CMAKE_CROSSCOMPILING_EMULATOR is necessary to support cross-compiling (ex: to win32 from mingw and running tests with wine) + add_test(NAME OpenEXRUtil.${curtest} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${curtest}) endforeach() endfunction() -#add_test(NAME OpenEXR.OpenEXRUtil COMMAND $) define_openexr_util_tests( testFlatImage