|
From: Julian S. <js...@ac...> - 2008-07-02 20:34:33
|
On Wednesday 02 July 2008 14:08, Bart Van Assche wrote: > On Tue, Jul 1, 2008 at 10:02 AM, Dirk Mueller <dm...@gm...> wrote: > > VG_(printf) uses "%t" as a "xml-escaped %s" attribute. This does not if > > gcc format checking is enabled, as %t is a nonstandard extension, which > > it doesn't understand. I've asked you some time ago wether it would be > > okay to either map it to "%s" and use a ToXml function for the argument, > > or to use a completely different (non printf-like) function for xml > > output. I guess the latter makes more sense, as line formatting (printf) > > doesn't really make sense with xml output, the stream output can be > > abstracted into something else. I suppose it would be a good thing to move towards separating the XML messaging completely. So, yes, the latter sounds better to me too. > How about the code below ? The patch below defines two variants of the > same function, namely VG_(xml_message)() and VG_(message)(). Format > string checking is disabled for the former and enabled for the latter. > This way the %t format specifier does not trigger a warning when > passed to VG_(xml_message)(). Am I right to understand that VG_(xml_message)() and VG_(message) are functionally identical, or is that not so? J |