Nikolay Sivov : xmllite: Fix long types warnings.
Alexandre Julliard
julliard at winehq.org
Tue Feb 1 15:21:35 CST 2022
Module: wine
Branch: master
Commit: 2848ce7621ae2dc699b781789f11f227069f0dd2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2848ce7621ae2dc699b781789f11f227069f0dd2
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Feb 1 19:01:05 2022 +0300
xmllite: Fix long types warnings.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/xmllite/Makefile.in | 1 -
dlls/xmllite/reader.c | 24 ++++++++++++------------
dlls/xmllite/writer.c | 48 +++++++++++++++++++++++++-----------------------
3 files changed, 37 insertions(+), 36 deletions(-)
diff --git a/dlls/xmllite/Makefile.in b/dlls/xmllite/Makefile.in
index 003c36a3a37..aeb448162f6 100644
--- a/dlls/xmllite/Makefile.in
+++ b/dlls/xmllite/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = xmllite.dll
IMPORTLIB = xmllite
diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c
index 834c36ae18c..ccdc1ae2c1b 100644
--- a/dlls/xmllite/reader.c
+++ b/dlls/xmllite/reader.c
@@ -840,7 +840,7 @@ static HRESULT readerinput_growraw(xmlreaderinput *readerinput)
read = 0;
hr = ISequentialStream_Read(readerinput->stream, buffer->data + buffer->written, len, &read);
- TRACE("written=%d, alloc=%d, requested=%d, read=%d, ret=0x%08x\n", buffer->written, buffer->allocated, len, read, hr);
+ TRACE("written=%d, alloc=%d, requested=%ld, read=%ld, ret=%#lx\n", buffer->written, buffer->allocated, len, read, hr);
readerinput->pending = hr == E_PENDING;
if (FAILED(hr)) return hr;
buffer->written += read;
@@ -2579,7 +2579,7 @@ static HRESULT reader_parse_nextnode(xmlreader *reader)
/* try to detect encoding by BOM or data and set input code page */
hr = readerinput_detectencoding(reader->input, &enc);
- TRACE("detected encoding %s, 0x%08x\n", enc == XmlEncoding_Unknown ? "(unknown)" :
+ TRACE("detected encoding %s, %#lx.\n", enc == XmlEncoding_Unknown ? "(unknown)" :
debugstr_w(xml_encoding_map[enc].name), hr);
if (FAILED(hr)) return hr;
@@ -2679,9 +2679,9 @@ static HRESULT WINAPI xmlreader_QueryInterface(IXmlReader *iface, REFIID riid, v
static ULONG WINAPI xmlreader_AddRef(IXmlReader *iface)
{
- xmlreader *This = impl_from_IXmlReader(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ xmlreader *reader = impl_from_IXmlReader(iface);
+ ULONG ref = InterlockedIncrement(&reader->ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -2725,7 +2725,7 @@ static ULONG WINAPI xmlreader_Release(IXmlReader *iface)
xmlreader *This = impl_from_IXmlReader(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (ref == 0)
{
@@ -2841,7 +2841,7 @@ static HRESULT WINAPI xmlreader_SetProperty(IXmlReader* iface, UINT property, LO
{
xmlreader *This = impl_from_IXmlReader(iface);
- TRACE("(%p)->(%s 0x%lx)\n", This, debugstr_reader_prop(property), value);
+ TRACE("%p, %s, %Ix.\n", iface, debugstr_reader_prop(property), value);
switch (property)
{
@@ -3590,9 +3590,9 @@ static HRESULT WINAPI xmlreaderinput_QueryInterface(IXmlReaderInput *iface, REFI
static ULONG WINAPI xmlreaderinput_AddRef(IXmlReaderInput *iface)
{
- xmlreaderinput *This = impl_from_IXmlReaderInput(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ xmlreaderinput *input = impl_from_IXmlReaderInput(iface);
+ ULONG ref = InterlockedIncrement(&input->ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -3601,7 +3601,7 @@ static ULONG WINAPI xmlreaderinput_Release(IXmlReaderInput *iface)
xmlreaderinput *This = impl_from_IXmlReaderInput(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (ref == 0)
{
@@ -3662,7 +3662,7 @@ HRESULT WINAPI CreateXmlReader(REFIID riid, void **obj, IMalloc *imalloc)
hr = IXmlReader_QueryInterface(&reader->IXmlReader_iface, riid, obj);
IXmlReader_Release(&reader->IXmlReader_iface);
- TRACE("returning iface %p, hr %#x\n", *obj, hr);
+ TRACE("returning iface %p, hr %#lx.\n", *obj, hr);
return hr;
}
diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c
index e4553ccf01d..ac02bd4c200 100644
--- a/dlls/xmllite/writer.c
+++ b/dlls/xmllite/writer.c
@@ -549,7 +549,7 @@ static HRESULT writeroutput_flush_stream(xmlwriteroutput *output)
written = 0;
hr = ISequentialStream_Write(output->stream, buffer->data + offset, buffer->written, &written);
if (FAILED(hr)) {
- WARN("write to stream failed (0x%08x)\n", hr);
+ WARN("write to stream failed %#lx.\n", hr);
buffer->written = 0;
return hr;
}
@@ -700,28 +700,30 @@ static HRESULT WINAPI xmlwriter_QueryInterface(IXmlWriter *iface, REFIID riid, v
static ULONG WINAPI xmlwriter_AddRef(IXmlWriter *iface)
{
- xmlwriter *This = impl_from_IXmlWriter(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%u)\n", This, ref);
+ xmlwriter *writer = impl_from_IXmlWriter(iface);
+ ULONG ref = InterlockedIncrement(&writer->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
static ULONG WINAPI xmlwriter_Release(IXmlWriter *iface)
{
- xmlwriter *This = impl_from_IXmlWriter(iface);
- ULONG ref = InterlockedDecrement(&This->ref);
+ xmlwriter *writer = impl_from_IXmlWriter(iface);
+ ULONG ref = InterlockedDecrement(&writer->ref);
- TRACE("(%p)->(%u)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- if (ref == 0) {
- IMalloc *imalloc = This->imalloc;
+ if (!ref)
+ {
+ IMalloc *imalloc = writer->imalloc;
- writeroutput_flush_stream(This->output);
- if (This->output) IUnknown_Release(&This->output->IXmlWriterOutput_iface);
+ writeroutput_flush_stream(writer->output);
+ if (writer->output)
+ IUnknown_Release(&writer->output->IXmlWriterOutput_iface);
- writer_free_element_stack(This);
+ writer_free_element_stack(writer);
- writer_free(This, This);
+ writer_free(writer, writer);
if (imalloc) IMalloc_Release(imalloc);
}
@@ -812,20 +814,20 @@ static HRESULT WINAPI xmlwriter_GetProperty(IXmlWriter *iface, UINT property, LO
static HRESULT WINAPI xmlwriter_SetProperty(IXmlWriter *iface, UINT property, LONG_PTR value)
{
- xmlwriter *This = impl_from_IXmlWriter(iface);
+ xmlwriter *writer = impl_from_IXmlWriter(iface);
- TRACE("(%p)->(%s %lu)\n", This, debugstr_writer_prop(property), value);
+ TRACE("%p, %s, %Id.\n", iface, debugstr_writer_prop(property), value);
switch (property)
{
case XmlWriterProperty_Indent:
- This->indent = !!value;
+ writer->indent = !!value;
break;
case XmlWriterProperty_ByteOrderMark:
- This->bom = !!value;
+ writer->bom = !!value;
break;
case XmlWriterProperty_OmitXmlDeclaration:
- This->omitxmldecl = !!value;
+ writer->omitxmldecl = !!value;
break;
default:
FIXME("Unimplemented property (%u)\n", property);
@@ -1822,9 +1824,9 @@ static HRESULT WINAPI xmlwriteroutput_QueryInterface(IXmlWriterOutput *iface, RE
static ULONG WINAPI xmlwriteroutput_AddRef(IXmlWriterOutput *iface)
{
- xmlwriteroutput *This = impl_from_IXmlWriterOutput(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ xmlwriteroutput *output = impl_from_IXmlWriterOutput(iface);
+ ULONG ref = InterlockedIncrement(&output->ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -1833,7 +1835,7 @@ static ULONG WINAPI xmlwriteroutput_Release(IXmlWriterOutput *iface)
xmlwriteroutput *This = impl_from_IXmlWriterOutput(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (ref == 0)
{
@@ -1884,7 +1886,7 @@ HRESULT WINAPI CreateXmlWriter(REFIID riid, void **obj, IMalloc *imalloc)
hr = IXmlWriter_QueryInterface(&writer->IXmlWriter_iface, riid, obj);
IXmlWriter_Release(&writer->IXmlWriter_iface);
- TRACE("returning iface %p, hr %#x\n", *obj, hr);
+ TRACE("returning iface %p, hr %#lx.\n", *obj, hr);
return hr;
}
More information about the wine-cvs
mailing list