The conversion specifier to output a StrBuf had to be changed, because gcc

emits a warning for each such unknown conversion specifier.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3824 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2008-03-31 20:51:31 +00:00
parent 528dff89b1
commit 6a7e844500
2 changed files with 48 additions and 7 deletions

View File

@@ -6,8 +6,8 @@
/* */
/* */
/* */
/* (C) 2000-2004 Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* (C) 2000-2008 Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -33,6 +33,18 @@
/* We need a way to output a StrBuf, but on the other side, we don't want to
* switch off gcc's printf format string checking. So we cheat as follows:
* %m (which is a gcc extension and doesn't take an argument) switches %p
* between outputting a pointer and a string buf. This works just one time,
* so each StrBuf needs in fact a %m%p spec. There's no way to apply a width
* and precision to such a StrBuf, but *not* using %p would bring up a warning
* about a wrong argument type each time. Maybe gcc will one day allow custom
* format specifiers and we can change this ...
*/
#ifndef XSPRINTF_H
#define XSPRINTF_H