Zebediah Figura : devenum: Build without -DWINE_NO_LONG_TYPES.

Alexandre Julliard julliard at winehq.org
Wed Feb 2 16:38:02 CST 2022


Module: wine
Branch: master
Commit: 95aa1bab76d6582df2e64b6fc6ac5f4ddcfdeb78
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=95aa1bab76d6582df2e64b6fc6ac5f4ddcfdeb78

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Tue Feb  1 23:47:09 2022 -0600

devenum: Build without -DWINE_NO_LONG_TYPES.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/devenum/Makefile.in     |  1 -
 dlls/devenum/createdevenum.c |  2 +-
 dlls/devenum/mediacatenum.c  | 48 ++++++++++++++++++++++++--------------------
 3 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/dlls/devenum/Makefile.in b/dlls/devenum/Makefile.in
index c1a88ac8e4e..16ae8e1abfa 100644
--- a/dlls/devenum/Makefile.in
+++ b/dlls/devenum/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 MODULE    = devenum.dll
 IMPORTS   = dmoguids strmiids uuid ole32 oleaut32 avicap32 winmm user32 advapi32 dsound msdmo
 DELAYIMPORTS = msvfw32
diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c
index bec462e0f5a..8d59d6b385d 100644
--- a/dlls/devenum/createdevenum.c
+++ b/dlls/devenum/createdevenum.c
@@ -769,7 +769,7 @@ static HRESULT WINAPI devenum_factory_CreateClassEnumerator(ICreateDevEnum *ifac
     HRESULT hr;
     HKEY key;
 
-    TRACE("iface %p, class %s, out %p, flags %#x.\n", iface, debugstr_guid(class), out, flags);
+    TRACE("iface %p, class %s, out %p, flags %#lx.\n", iface, debugstr_guid(class), out, flags);
 
     if (!out)
         return E_POINTER;
diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c
index 9d8069a3aa2..2d87709bea6 100644
--- a/dlls/devenum/mediacatenum.c
+++ b/dlls/devenum/mediacatenum.c
@@ -137,8 +137,8 @@ static HRESULT WINAPI property_bag_Read(IPropertyBag *iface,
         }
         else if (!wcscmp(name, L"FilterData"))
         {
-            unsigned int count = 1, input_count, output_count, i;
             DMO_PARTIAL_MEDIATYPE *types = NULL, *new_array;
+            ULONG count = 1, input_count, output_count, i;
             REGFILTERPINS2 reg_pins[2] = {{0}};
             REGFILTER2 reg_filter = {0};
             REGPINTYPES *reg_types;
@@ -287,7 +287,7 @@ static HRESULT WINAPI property_bag_Read(IPropertyBag *iface,
         return S_OK;
     }
     default:
-        FIXME("Unhandled type %#x.\n", type);
+        FIXME("Unhandled type %#lx.\n", type);
         free(data);
         return E_NOTIMPL;
     }
@@ -396,26 +396,27 @@ static HRESULT WINAPI moniker_QueryInterface(IMoniker *iface, REFIID riid, void
 
 static ULONG WINAPI moniker_AddRef(IMoniker *iface)
 {
-    struct moniker *This = impl_from_IMoniker(iface);
-    ULONG ref = InterlockedIncrement(&This->ref);
+    struct moniker *moniker = impl_from_IMoniker(iface);
+    ULONG refcount = InterlockedIncrement(&moniker->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("%p increasing refcount to %lu.\n", moniker, refcount);
 
-    return ref;
+    return refcount;
 }
 
 static ULONG WINAPI moniker_Release(IMoniker *iface)
 {
     struct moniker *This = impl_from_IMoniker(iface);
-    ULONG ref = InterlockedDecrement(&This->ref);
+    ULONG refcount = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("%p decreasing refcount to %lu.\n", This, refcount);
 
-    if (ref == 0) {
+    if (!refcount)
+    {
         free(This->name);
         free(This);
     }
-    return ref;
+    return refcount;
 }
 
 static HRESULT WINAPI moniker_GetClassID(IMoniker *iface, CLSID *pClassID)
@@ -558,7 +559,10 @@ static HRESULT WINAPI moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc,
 static HRESULT WINAPI moniker_Reduce(IMoniker *iface, IBindCtx *pbc,
         DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
 {
-    TRACE("(%p)->(%p, %d, %p, %p)\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
+    struct moniker *moniker = impl_from_IMoniker(iface);
+
+    TRACE("moniker %p, bind_ctx %p, how_far %#lx, left %p, reduced %p.\n",
+            moniker, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
 
     if (ppmkToLeft)
         *ppmkToLeft = NULL;
@@ -848,22 +852,22 @@ static HRESULT WINAPI enum_moniker_QueryInterface(IEnumMoniker *iface, REFIID ri
 
 static ULONG WINAPI enum_moniker_AddRef(IEnumMoniker *iface)
 {
-    EnumMonikerImpl *This = impl_from_IEnumMoniker(iface);
-    ULONG ref = InterlockedIncrement(&This->ref);
+    EnumMonikerImpl *enumerator = impl_from_IEnumMoniker(iface);
+    ULONG refcount = InterlockedIncrement(&enumerator->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("%p increasing refcount to %lu.\n", enumerator, refcount);
 
-    return ref;
+    return refcount;
 }
 
 static ULONG WINAPI enum_moniker_Release(IEnumMoniker *iface)
 {
     EnumMonikerImpl *This = impl_from_IEnumMoniker(iface);
-    ULONG ref = InterlockedDecrement(&This->ref);
+    ULONG refcount = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("%p decreasing refcount to %lu.\n", This, refcount);
 
-    if (!ref)
+    if (!refcount)
     {
         if (This->dmo_enum)
             IEnumDMO_Release(This->dmo_enum);
@@ -874,7 +878,7 @@ static ULONG WINAPI enum_moniker_Release(IEnumMoniker *iface)
         free(This);
         return 0;
     }
-    return ref;
+    return refcount;
 }
 
 static struct moniker *get_dmo_moniker(EnumMonikerImpl *enum_moniker)
@@ -907,7 +911,7 @@ static HRESULT WINAPI enum_moniker_Next(IEnumMoniker *iface, ULONG celt, IMonike
     ULONG fetched = 0;
     HKEY hkey;
 
-    TRACE("(%p)->(%d, %p, %p)\n", iface, celt, rgelt, pceltFetched);
+    TRACE("enumerator %p, count %lu, monikers %p, ret_count %p.\n", This, celt, rgelt, pceltFetched);
 
     while (fetched < celt)
     {
@@ -944,7 +948,7 @@ static HRESULT WINAPI enum_moniker_Next(IEnumMoniker *iface, ULONG celt, IMonike
         rgelt[fetched++] = &moniker->IMoniker_iface;
     }
 
-    TRACE("-- fetched %d\n", fetched);
+    TRACE("Returning %lu monikers.\n", fetched);
 
     if (pceltFetched)
         *pceltFetched = fetched;
@@ -959,7 +963,7 @@ static HRESULT WINAPI enum_moniker_Skip(IEnumMoniker *iface, ULONG celt)
 {
     EnumMonikerImpl *This = impl_from_IEnumMoniker(iface);
 
-    TRACE("(%p)->(%d)\n", iface, celt);
+    TRACE("enumerator %p, count %lu.\n", This, celt);
 
     while (celt--)
     {




More information about the wine-cvs mailing list