[PATCH:xfs 1/4] Make CONFIG_ERR_* values be strings instead of indexes in ConfigErrors array

Mark Kettenis mark.kettenis at xs4all.nl
Sat Nov 12 02:28:27 PST 2011


> From: Alan Coopersmith <alan.coopersmith at oracle.com>
> Date: Fri, 11 Nov 2011 22:49:07 -0800
> 
> Allows gcc to check printf format strings instead of just giving warnings.
> Since these #defines are only used in config.c, define them directly there,
> instead of in the config.h header that no one else includes.
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  os/config.c |   47 ++++++++++++++++++++++-------------------------
>  os/config.h |   12 ------------
>  2 files changed, 22 insertions(+), 37 deletions(-)
> 

Hmm, perhaps write this:

#define	CONFIG_ERR_MEMORY "CONFIG: insufficient memory to load configuration file \"%s\"\n"

as:

#define	CONFIG_ERR_MEMORY \
	"CONFIG: insufficient memory to load configuration file \"%s\"\n"

to prevent the lines from getting too long?


More information about the xorg-devel mailing list