by passing a long int to a printf format expecting an int.
Fix more problems found by GCC 4.6.0's static checks.
+ * fns.c (Fstring_to_unibyte): Don't rely on undefined behavior
+ by passing a long int to a printf format expecting an int.
+
* lisp.h (message, message_nolog, doprint, error, verror, fatal):
Mark as printf-like functions.
EMACS_INT converted = str_to_unibyte (SDATA (string), str, chars, 0);
if (converted < chars)
- error ("Can't convert the %dth character to unibyte", converted);
+ {
+ long lconverted = converted;
+ error ("Can't convert the %ldth character to unibyte", lconverted);
+ }
string = make_unibyte_string ((char *) str, chars);
xfree (str);
}