From 20a4649b84897c7a60359d5cfe2d60703cd4707d Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 4 Oct 2018 10:34:04 +1000 Subject: [PATCH] Updated Compiler_Warnings patchset --- ...oid-implicit-cast-of-interface-point.patch | 61 ++++++++++++++ ...d-implicit-cast-of-interface-pointer.patch | 84 +++++++++++++++++-- patches/patchinstall.sh | 13 +-- 3 files changed, 144 insertions(+), 14 deletions(-) create mode 100644 patches/Compiler_Warnings/0001-windowscodecs-Avoid-implicit-cast-of-interface-point.patch diff --git a/patches/Compiler_Warnings/0001-windowscodecs-Avoid-implicit-cast-of-interface-point.patch b/patches/Compiler_Warnings/0001-windowscodecs-Avoid-implicit-cast-of-interface-point.patch new file mode 100644 index 00000000..2adbe99e --- /dev/null +++ b/patches/Compiler_Warnings/0001-windowscodecs-Avoid-implicit-cast-of-interface-point.patch @@ -0,0 +1,61 @@ +From fc5c0462f64e0976d596bd726da4d7f0e4857384 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 19 Sep 2018 09:03:19 +1000 +Subject: [PATCH] windowscodecs: Avoid implicit cast of interface pointer. + +--- + dlls/windowscodecs/info.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c +index 0a86266..8c81574 100644 +--- a/dlls/windowscodecs/info.c ++++ b/dlls/windowscodecs/info.c +@@ -222,7 +222,7 @@ typedef struct { + + static inline BitmapDecoderInfo *impl_from_IWICBitmapDecoderInfo(IWICBitmapDecoderInfo *iface) + { +- return CONTAINING_RECORD(iface, BitmapDecoderInfo, base.IWICComponentInfo_iface); ++ return CONTAINING_RECORD((IWICComponentInfo*)iface, BitmapDecoderInfo, base.IWICComponentInfo_iface); + } + + static HRESULT WINAPI BitmapDecoderInfo_QueryInterface(IWICBitmapDecoderInfo *iface, REFIID iid, +@@ -713,7 +713,7 @@ typedef struct { + + static inline BitmapEncoderInfo *impl_from_IWICBitmapEncoderInfo(IWICBitmapEncoderInfo *iface) + { +- return CONTAINING_RECORD(iface, BitmapEncoderInfo, base.IWICComponentInfo_iface); ++ return CONTAINING_RECORD((IWICComponentInfo*)iface, BitmapEncoderInfo, base.IWICComponentInfo_iface); + } + + static HRESULT WINAPI BitmapEncoderInfo_QueryInterface(IWICBitmapEncoderInfo *iface, REFIID iid, +@@ -1005,7 +1005,7 @@ typedef struct { + + static inline FormatConverterInfo *impl_from_IWICFormatConverterInfo(IWICFormatConverterInfo *iface) + { +- return CONTAINING_RECORD(iface, FormatConverterInfo, base.IWICComponentInfo_iface); ++ return CONTAINING_RECORD((IWICComponentInfo*)iface, FormatConverterInfo, base.IWICComponentInfo_iface); + } + + static HRESULT WINAPI FormatConverterInfo_QueryInterface(IWICFormatConverterInfo *iface, REFIID iid, +@@ -1219,7 +1219,7 @@ typedef struct { + + static inline PixelFormatInfo *impl_from_IWICPixelFormatInfo2(IWICPixelFormatInfo2 *iface) + { +- return CONTAINING_RECORD(iface, PixelFormatInfo, base.IWICComponentInfo_iface); ++ return CONTAINING_RECORD((IWICComponentInfo*)iface, PixelFormatInfo, base.IWICComponentInfo_iface); + } + + static HRESULT WINAPI PixelFormatInfo_QueryInterface(IWICPixelFormatInfo2 *iface, REFIID iid, +@@ -1531,7 +1531,7 @@ static struct metadata_container *get_metadata_container(MetadataReaderInfo *inf + + static inline MetadataReaderInfo *impl_from_IWICMetadataReaderInfo(IWICMetadataReaderInfo *iface) + { +- return CONTAINING_RECORD(iface, MetadataReaderInfo, base.IWICComponentInfo_iface); ++ return CONTAINING_RECORD((IWICComponentInfo*)iface, MetadataReaderInfo, base.IWICComponentInfo_iface); + } + + static HRESULT WINAPI MetadataReaderInfo_QueryInterface(IWICMetadataReaderInfo *iface, +-- +1.9.1 + diff --git a/patches/Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch b/patches/Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch index 0dc02771..a633605b 100644 --- a/patches/Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch +++ b/patches/Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch @@ -1,15 +1,31 @@ -From e8bc998c7b00a18a724f6cfd2823aefcd8b1b15c Mon Sep 17 00:00:00 2001 +From 2aeb3a9e57142c3f4ff86cb81b206bdbc146552d Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 22 Mar 2016 21:54:26 +0100 -Subject: d2d1: Avoid implicit cast of interface pointer. +Subject: [PATCH] d2d1: Avoid implicit cast of interface pointer. --- - dlls/d2d1/brush.c | 8 ++++---- - dlls/d2d1/geometry.c | 6 +++--- - 2 files changed, 7 insertions(+), 7 deletions(-) + dlls/d2d1/bitmap.c | 2 +- + dlls/d2d1/brush.c | 8 ++++---- + dlls/d2d1/dc_render_target.c | 2 +- + dlls/d2d1/device.c | 2 +- + dlls/d2d1/geometry.c | 6 +++--- + dlls/d2d1/hwnd_render_target.c | 2 +- + dlls/d2d1/state_block.c | 2 +- + 7 files changed, 12 insertions(+), 12 deletions(-) +diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c +index c0aef3c..8a4b517 100644 +--- a/dlls/d2d1/bitmap.c ++++ b/dlls/d2d1/bitmap.c +@@ -626,5 +626,5 @@ struct d2d_bitmap *unsafe_impl_from_ID2D1Bitmap(ID2D1Bitmap *iface) + if (!iface) + return NULL; + assert(iface->lpVtbl == (ID2D1BitmapVtbl *)&d2d_bitmap_vtbl); +- return CONTAINING_RECORD(iface, struct d2d_bitmap, ID2D1Bitmap1_iface); ++ return CONTAINING_RECORD((ID2D1Bitmap1*)iface, struct d2d_bitmap, ID2D1Bitmap1_iface); + } diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c -index b03af89..319a188 100644 +index 9c73ae1..a748669 100644 --- a/dlls/d2d1/brush.c +++ b/dlls/d2d1/brush.c @@ -256,7 +256,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory, @@ -48,8 +64,34 @@ index b03af89..319a188 100644 } static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrush1 *iface, +diff --git a/dlls/d2d1/dc_render_target.c b/dlls/d2d1/dc_render_target.c +index b095008..6030826 100644 +--- a/dlls/d2d1/dc_render_target.c ++++ b/dlls/d2d1/dc_render_target.c +@@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d); + + static inline struct d2d_dc_render_target *impl_from_IUnknown(IUnknown *iface) + { +- return CONTAINING_RECORD(iface, struct d2d_dc_render_target, ID2D1DCRenderTarget_iface); ++ return CONTAINING_RECORD((ID2D1DCRenderTarget*)iface, struct d2d_dc_render_target, ID2D1DCRenderTarget_iface); + } + + static HRESULT d2d_dc_render_target_present(IUnknown *outer_unknown) +diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c +index 45b2258..bf32c23 100644 +--- a/dlls/d2d1/device.c ++++ b/dlls/d2d1/device.c +@@ -207,7 +207,7 @@ static inline struct d2d_device_context *impl_from_ID2D1DeviceContext(ID2D1Devic + + static inline struct d2d_device_context *impl_from_ID2D1RenderTarget(ID2D1RenderTarget *iface) + { +- return CONTAINING_RECORD(iface, struct d2d_device_context, ID2D1DeviceContext_iface); ++ return CONTAINING_RECORD((ID2D1DeviceContext*)iface, struct d2d_device_context, ID2D1DeviceContext_iface); + } + + static HRESULT STDMETHODCALLTYPE d2d_device_context_inner_QueryInterface(IUnknown *iface, REFIID iid, void **out) diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c -index d716fb1..18d8deb 100644 +index 421ba2b..f8db51c 100644 --- a/dlls/d2d1/geometry.c +++ b/dlls/d2d1/geometry.c @@ -2987,7 +2987,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl = @@ -70,7 +112,7 @@ index d716fb1..18d8deb 100644 } static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_QueryInterface(ID2D1RectangleGeometry *iface, -@@ -3839,7 +3839,7 @@ fail: +@@ -3838,7 +3838,7 @@ fail: static inline struct d2d_geometry *impl_from_ID2D1TransformedGeometry(ID2D1TransformedGeometry *iface) { @@ -79,6 +121,30 @@ index d716fb1..18d8deb 100644 } static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_QueryInterface(ID2D1TransformedGeometry *iface, +diff --git a/dlls/d2d1/hwnd_render_target.c b/dlls/d2d1/hwnd_render_target.c +index d0b9695..429561e 100644 +--- a/dlls/d2d1/hwnd_render_target.c ++++ b/dlls/d2d1/hwnd_render_target.c +@@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d); + + static inline struct d2d_hwnd_render_target *impl_from_IUnknown(IUnknown *iface) + { +- return CONTAINING_RECORD(iface, struct d2d_hwnd_render_target, ID2D1HwndRenderTarget_iface); ++ return CONTAINING_RECORD((ID2D1HwndRenderTarget*)iface, struct d2d_hwnd_render_target, ID2D1HwndRenderTarget_iface); + } + + static HRESULT d2d_hwnd_render_target_present(IUnknown *outer_unknown) +diff --git a/dlls/d2d1/state_block.c b/dlls/d2d1/state_block.c +index b15384e..4e7e34b 100644 +--- a/dlls/d2d1/state_block.c ++++ b/dlls/d2d1/state_block.c +@@ -190,5 +190,5 @@ struct d2d_state_block *unsafe_impl_from_ID2D1DrawingStateBlock(ID2D1DrawingStat + if (!iface) + return NULL; + assert(iface->lpVtbl == (ID2D1DrawingStateBlockVtbl *)&d2d_state_block_vtbl); +- return CONTAINING_RECORD(iface, struct d2d_state_block, ID2D1DrawingStateBlock1_iface); ++ return CONTAINING_RECORD((ID2D1DrawingStateBlock1*)iface, struct d2d_state_block, ID2D1DrawingStateBlock1_iface); + } -- -2.7.4 +1.9.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index f6394005..197abcb2 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "c96eba60e347e9ce79f8b60e0fac9bf69c165ced" + echo "adf451279837743a3b19787eb1e1b9c2b239bcd7" } # Show version information @@ -2261,12 +2261,14 @@ fi # Patchset Compiler_Warnings # | # | Modified files: -# | * dlls/amstream/mediastreamfilter.c, dlls/d2d1/brush.c, dlls/d2d1/geometry.c, dlls/d3d11/view.c, dlls/d3d8/texture.c, -# | dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dwrite/font.c, dlls/dwrite/layout.c, dlls/evr/evr.c, -# | dlls/msxml3/schema.c, dlls/oleaut32/oleaut.c, dlls/rpcrt4/cstub.c, dlls/vbscript/vbdisp.c, dlls/wsdapi/msgparams.c, -# | include/wine/list.h, include/wine/rbtree.h, include/winnt.h +# | * dlls/amstream/mediastreamfilter.c, dlls/d2d1/bitmap.c, dlls/d2d1/brush.c, dlls/d2d1/dc_render_target.c, +# | dlls/d2d1/device.c, dlls/d2d1/geometry.c, dlls/d2d1/hwnd_render_target.c, dlls/d2d1/state_block.c, dlls/d3d11/view.c, +# | dlls/d3d8/texture.c, dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dwrite/font.c, dlls/dwrite/layout.c, +# | dlls/evr/evr.c, dlls/msxml3/schema.c, dlls/oleaut32/oleaut.c, dlls/rpcrt4/cstub.c, dlls/vbscript/vbdisp.c, +# | dlls/windowscodecs/info.c, dlls/wsdapi/msgparams.c, include/wine/list.h, include/wine/rbtree.h, include/winnt.h # | if test "$enable_Compiler_Warnings" -eq 1; then + patch_apply Compiler_Warnings/0001-windowscodecs-Avoid-implicit-cast-of-interface-point.patch patch_apply Compiler_Warnings/0020-amstream-Avoid-implicit-cast-of-interface-pointer.patch patch_apply Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch patch_apply Compiler_Warnings/0022-d3d11-Avoid-implicit-cast-of-interface-pointer.patch @@ -2282,6 +2284,7 @@ if test "$enable_Compiler_Warnings" -eq 1; then patch_apply Compiler_Warnings/0032-wsdapi-Avoid-implicit-cast-of-interface-pointer.patch patch_apply Compiler_Warnings/0033-evr-Avoid-implicit-cast-of-interface-pointer.patch ( + printf '%s\n' '+ { "Alistair Leslie-Hughes", "windowscodecs: Avoid implicit cast of interface pointer.", 1 },'; printf '%s\n' '+ { "Sebastian Lackner", "amstream: Avoid implicit cast of interface pointer.", 1 },'; printf '%s\n' '+ { "Sebastian Lackner", "d2d1: Avoid implicit cast of interface pointer.", 1 },'; printf '%s\n' '+ { "Sebastian Lackner", "d3d11: Avoid implicit cast of interface pointer.", 1 },';