[PATCH 1/5] msi: Build stub files with -Wno-cast-calling-convention.

Chip Davis cdavis at codeweavers.com
Wed Apr 8 01:05:46 CDT 2020


Clang warns when casting between function pointer types where the
calling conventions differ; this is of course intended to catch bugs
that we ourselves have had to work around. But the casts here are
compatible with what MIDL generates, so there isn't much we can do here
beyond disabling the warning. This is generated code anyway; it should
be expected to work.

Signed-off-by: Chip Davis <cdavis at codeweavers.com>
---
 configure.ac         | 1 +
 dlls/msi/Makefile.in | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index 970ff0b3419..aa91a15604d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1069,6 +1069,7 @@ then
         WINE_TRY_CROSSCFLAGS([-fno-strict-aliasing])
         dnl clang needs to be told to fail on unknown options
         WINE_TRY_CROSSCFLAGS([-Werror=unknown-warning-option],[CFLAGS="$CFLAGS -Werror=unknown-warning-option"])
+        WINE_TRY_CROSSCFLAGS([-Wcast-calling-convention],[AC_SUBST(NO_CAST_CALLING_CONV_CFLAGS,"-Wno-cast-calling-convention")])
         WINE_TRY_CROSSCFLAGS([-Wdeclaration-after-statement])
         WINE_TRY_CROSSCFLAGS([-Wempty-body])
         WINE_TRY_CROSSCFLAGS([-Wignored-qualifiers])
diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in
index cf6d498e344..cbc8e33dc8c 100644
--- a/dlls/msi/Makefile.in
+++ b/dlls/msi/Makefile.in
@@ -6,6 +6,8 @@ EXTRAIDLFLAGS = --prefix-server=s_
 
 EXTRADLLFLAGS = -mno-cygwin
 
+winemsi_s_EXTRADEFS = $(NO_CAST_CALLING_CONV_CFLAGS)
+
 C_SRCS = \
 	action.c \
 	alter.c \
-- 
2.24.0




More information about the wine-devel mailing list