Commit 2848ce76 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

xmllite: Fix long types warnings.

parent 22fda599
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = xmllite.dll
IMPORTLIB = xmllite
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment