From 72782c04934312805c06a693dcaf630b99d117ec Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 29 Dec 2020 10:25:12 -0600 Subject: [PATCH] devenum: Avoid initializing nameless unions in designated initializers. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50423 Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/devenum/mediacatenum.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c index ab675b5656f..f097c580261 100644 --- a/dlls/devenum/mediacatenum.c +++ b/dlls/devenum/mediacatenum.c @@ -137,17 +137,10 @@ static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, } else if (!wcscmp(name, L"FilterData")) { - REGFILTERPINS2 reg_pins[2] = {{0}}; - REGFILTER2 reg_filter = - { - .dwVersion = 2, - .dwMerit = MERIT_NORMAL + 0x800, - .cPins2 = 2, - .rgPins2 = reg_pins, - }; - unsigned int count = 1, input_count, output_count, i; DMO_PARTIAL_MEDIATYPE *types = NULL, *new_array; + REGFILTERPINS2 reg_pins[2] = {{0}}; + REGFILTER2 reg_filter = {0}; REGPINTYPES *reg_types; HRESULT hr; @@ -192,6 +185,10 @@ static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, reg_pins[1].cInstances = 1; reg_pins[1].nMediaTypes = output_count; reg_pins[1].lpMediaType = reg_types + count; + reg_filter.dwVersion = 2; + reg_filter.dwMerit = MERIT_NORMAL + 0x800, + reg_filter.cPins2 = 2; + reg_filter.rgPins2 = reg_pins; hr = create_filter_data(var, ®_filter); free(reg_types);