From: Simon McVittie Date: Fri, 7 Oct 2016 18:19:35 +0000 (+0100) Subject: Print XML parse errors correctly X-Git-Tag: dbus-1.11.8~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34b1b3f06d73bf85d81258595b49056ccf189083;p=thirdparty%2Fdbus.git Print XML parse errors correctly Signed-off-by: Simon McVittie --- diff --git a/bus/config-loader-expat.c b/bus/config-loader-expat.c index 901969734..f59942e32 100644 --- a/bus/config-loader-expat.c +++ b/bus/config-loader-expat.c @@ -254,10 +254,13 @@ bus_config_load (const DBusString *file, dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); else dbus_set_error (error, DBUS_ERROR_FAILED, - "Error in file %s, line %d, column %d: %s\n", + "Error in file %s, line %lu, column %lu: %s\n", filename, - XML_GetCurrentLineNumber (expat), - XML_GetCurrentColumnNumber (expat), + /* The XML_Size type varies according to + * build options, so cast to something we can + * cope with. */ + (unsigned long) XML_GetCurrentLineNumber (expat), + (unsigned long) XML_GetCurrentColumnNumber (expat), XML_ErrorString (e)); }