From d829bcc629b36ecf38c8a99f2f4098296b071c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 6 Nov 2020 00:17:33 +0100 Subject: [PATCH] [WINDOWSCODECS] It turns out that /wd4133 is not enough to demote the error; we need to use remove_target_compile_option() to completely remove the /we4133 flag. Addendum to commits 7e116f0e and 00ed72d7. This removes the "error C4133: 'function': incompatible types - from 'WICPixelFormatNumericRepresentation *' to 'DWORD *'" message that still remains even when using /wd4133 . --- dll/win32/windowscodecs/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dll/win32/windowscodecs/CMakeLists.txt b/dll/win32/windowscodecs/CMakeLists.txt index c9f0e9ecdbd..316fd1f329b 100644 --- a/dll/win32/windowscodecs/CMakeLists.txt +++ b/dll/win32/windowscodecs/CMakeLists.txt @@ -71,9 +71,10 @@ add_library(windowscodecs MODULE ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs.def) if(MSVC) - target_compile_options(windowscodecs PRIVATE - /wd4133 # error C4133: 'function': incompatible types - from 'WICPixelFormatNumericRepresentation *' to 'DWORD *' - /FItypeof.h) + # error C4133: 'function': incompatible types - from 'WICPixelFormatNumericRepresentation *' to 'DWORD *' + remove_target_compile_option(windowscodecs "/we4133") + + target_compile_options(windowscodecs PRIVATE /FItypeof.h) endif() set_module_type(windowscodecs win32dll)