msxml3: Fix printing NULL strings.
Francois Gouget
fgouget at free.fr
Sun Sep 18 12:46:17 CDT 2011
---
This lets the test complete without crashing on my Solaris VMs.
(schema.c uses wine_dbgstr_a() instead debugstr_a() so I just followed
suite)
dlls/msxml3/element.c | 8 ++++----
dlls/msxml3/httprequest.c | 4 ++--
dlls/msxml3/main.c | 4 ++--
dlls/msxml3/schema.c | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c
index f84dcb5..3def945 100644
--- a/dlls/msxml3/element.c
+++ b/dlls/msxml3/element.c
@@ -663,7 +663,7 @@ static inline HRESULT variant_from_dt(XDR_DT dt, xmlChar* str, VARIANT* v)
case DT_IDREF:
case DT_IDREFS:
case DT_NOTATION:
- FIXME("need to handle dt:%s\n", dt_to_str(dt));
+ FIXME("need to handle dt:%s\n", debugstr_a(dt_to_str(dt)));
V_VT(v) = VT_BSTR;
V_BSTR(v) = bstr_from_xmlChar(str);
if (!V_BSTR(v))
@@ -729,7 +729,7 @@ static XDR_DT element_get_dt(xmlNodePtr node)
}
}
- TRACE("=> dt:%s\n", dt_to_str(dt));
+ TRACE("=> dt:%s\n", debugstr_a(dt_to_str(dt)));
return dt;
}
@@ -786,7 +786,7 @@ static HRESULT WINAPI domelem_put_nodeTypedValue(
}
else
{
- FIXME("not implemented for dt:%s\n", dt_to_str(dt));
+ FIXME("not implemented for dt:%s\n", debugstr_a(dt_to_str(dt)));
return E_NOTIMPL;
}
@@ -934,7 +934,7 @@ static HRESULT WINAPI domelem_put_dataType(
}
break;
default:
- FIXME("need to handle dt:%s\n", dt_to_str(dt));
+ FIXME("need to handle dt:%s\n", debugstr_a(dt_to_str(dt)));
break;
}
}
diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index 8203129..0265c1a 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -888,12 +888,12 @@ static HRESULT WINAPI httprequest_get_responseText(IXMLHTTPRequest *iface, BSTR
if (size >= 4)
{
encoding = xmlDetectCharEncoding(ptr, 4);
- TRACE("detected encoding: %s\n", xmlGetCharEncodingName(encoding));
+ TRACE("detected encoding: %s\n", debugstr_a(xmlGetCharEncodingName(encoding)));
if ( encoding != XML_CHAR_ENCODING_UTF8 &&
encoding != XML_CHAR_ENCODING_UTF16LE &&
encoding != XML_CHAR_ENCODING_NONE )
{
- FIXME("unsupported encoding: %s\n", xmlGetCharEncodingName(encoding));
+ FIXME("unsupported encoding: %s\n", debugstr_a(xmlGetCharEncodingName(encoding)));
GlobalUnlock(hglobal);
return E_FAIL;
}
diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c
index 2363008..c4e4303 100644
--- a/dlls/msxml3/main.c
+++ b/dlls/msxml3/main.c
@@ -105,7 +105,7 @@ void wineXmlCallbackError(char const* caller, xmlErrorPtr err)
case XML_ERR_WARNING: dbcl = __WINE_DBCL_WARN; break;
default: dbcl = __WINE_DBCL_ERR; break;
}
- wine_dbg_log(dbcl, &__wine_dbch_msxml, caller, "%s", err->message);
+ wine_dbg_log(dbcl, &__wine_dbch_msxml, caller, "%s", debugstr_a(err->message));
}
/* Support for loading xml files from a Wine Windows drive */
@@ -288,7 +288,7 @@ const char *debugstr_variant(const VARIANT *v)
return wine_dbg_sprintf("{VT_UINT: %u}", V_UINT(v));
case VT_BSTR|VT_BYREF:
return wine_dbg_sprintf("{VT_BSTR|VT_BYREF: ptr %p, data %s}",
- V_BSTRREF(v), V_BSTRREF(v) ? debugstr_w(*V_BSTRREF(v)) : NULL);
+ V_BSTRREF(v), debugstr_w(V_BSTRREF(v) ? *V_BSTRREF(v) : NULL));
default:
return wine_dbg_sprintf("{vt %d}", V_VT(v));
}
diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c
index 8f2acb4..fdb4604 100644
--- a/dlls/msxml3/schema.c
+++ b/dlls/msxml3/schema.c
@@ -580,7 +580,7 @@ HRESULT dt_validate(XDR_DT dt, xmlChar const* content)
xmlNsPtr ns;
HRESULT hr;
- TRACE("(dt:%s, %s)\n", dt_to_str(dt), wine_dbgstr_a((char const*)content));
+ TRACE("(dt:%s, %s)\n", wine_dbgstr_a(dt_to_str(dt)), wine_dbgstr_a((char const*)content));
if (!datatypes_schema)
{
@@ -650,7 +650,7 @@ HRESULT dt_validate(XDR_DT dt, xmlChar const* content)
}
return hr;
default:
- FIXME("need to handle dt:%s\n", dt_to_str(dt));
+ FIXME("need to handle dt:%s\n", wine_dbgstr_a(dt_to_str(dt)));
return S_OK;
}
}
--
1.7.5.4
More information about the wine-patches
mailing list