From 757849cd93a9bc361a5113e3aaafe516773aad44 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 23 Nov 2013 22:23:52 -0500 Subject: [SV 40361] Don't use vsnprintf(), which is an ISO C99 function. * output.c (error, fatal, message): Take an extra argument specifying how many bytes are used by the formatted arguments. (get_buffer): New function that allocates the requested buffer size. Remove msc_vsnprintf(), vfmtconcat(), and fmtconcat() as unneeded. * makeint.h: Declare various helper macros for generating output. * *.c: Change all error(), fatal(), message() calls to use the macros, or pass the extra length argument directly. --- variable.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'variable.h') diff --git a/variable.h b/variable.h index dec75b1..eda2493 100644 --- a/variable.h +++ b/variable.h @@ -219,10 +219,10 @@ void undefine_variable_in_set (const char *name, unsigned int length, /* Warn that NAME is an undefined variable. */ #define warn_undefined(n,l) do{\ - if (warn_undefined_variables_flag) \ - error (reading_file, \ + if (warn_undefined_variables_flag) \ + error (reading_file, (l), \ _("warning: undefined variable '%.*s'"), \ - (int)(l), (n)); \ + (int)(l), (n)); \ }while(0) char **target_environment (struct file *file); -- cgit v1.2.3