Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

HEADS UP: new %m check for printf-alike functions



Hi!

There is a format string modifier "%m" (printing strerror(errno))
that's supported by syslog(), and some versions of *printf(), e.g. in
glibc.

Compiling on -current now warns when it finds this modifier in string
passed to a function that's not known to support this.

If you stumble over this, do something similar to:

printf("%m");

->

printf("%s", strerror(errno));

Just so you know.
 Thomas


Home | Main Index | Thread Index | Old Index