On Sat, 18 Jun 2011 00:42:30 EDT, Ted Unangst wrote: > lint does not understand the %m format, leading to false positives. The > too few format args is one of the important ones, IMO, so we should try to > make it accurate.
That seems reasonable but I think you want to treat "%m" like "%%". That way you can catch bogus modifiers of %m (none are supported). - todd Index: lint2/chk.c =================================================================== RCS file: /home/cvs/openbsd/src/usr.bin/xlint/lint2/chk.c,v retrieving revision 1.20 diff -u -r1.20 chk.c --- lint2/chk.c 31 May 2011 22:27:54 -0000 1.20 +++ lint2/chk.c 19 Jun 2011 00:54:39 -0000 @@ -798,7 +798,7 @@ if (sz != NOTSPEC) fc = *fp++; - if (fc == '%') { + if (fc == '%' || fc == 'm') { if (sz != NOTSPEC || left || sign || space || alt || zero || prec || fwidth) { badfmt(hte, call);