|
From: Bart V. A. <bar...@gm...> - 2008-07-01 07:49:55
|
On Tue, Jul 1, 2008 at 6:09 AM, Julian Seward <js...@ac...> wrote: > It would be much better to have the caller allocate the buffer. The function VG_(ToXML)() now expects the caller to allocate the buffer. I'm not sure whether the sizes I reserved for these buffers are large enough. > If this function's prototype is in pub_tool_libcprint.h then its > implementation should be in m_libcprint, not in m_debuglog. Fixed. > Also, adding extra includes to m_debuglog.c is not allowed, as per > big comment at the top of that file. Fixed. > What is the reason for needing VG_(ToXML) anyway? I thought the > XML output stuff worked OK as it is. A quote from gcc's -Wformat documentation (from the gcc 4.3.1 manual): "The formats are checked against the format features supported by GNU libc version 2.2. These include all ISO C90 and C99 features, as well as features from the Single Unix Specification and some BSD and GNU extensions." The %t format specifier, used for XML-escaping, is a Valgrind-extension and is not understood by gcc's format checker. That is why I replaced "...%t...", ..., str, ... by "...%s...", ..., ToXML(str), ... Bart. |