Date: Tue, 22 May 2018 09:37:18 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Ed Schouten <ed@nuxi.nl> Cc: Konstantin Belousov <kostikbel@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, Dimitry Andric <dim@freebsd.org>, Thomas Munro <munro@ip9.org> Subject: Re: printf("%m") doesn't generate a warning -- shouldn't it? Message-ID: <5221.1526981838@critter.freebsd.dk> In-Reply-To: <CABh_MKkWOaKZxqye2zW7tGF2Pro6hvnf5PHTgY8HqtHrFCprqg@mail.gmail.com> References: <CADLWmXU__ZRaS=gg_Y18WYbJJgk2Rs065RhkYmAZCFY8mp1Wjg@mail.gmail.com> <BAD690AA-C51A-4125-8F23-B637758C8EB6@FreeBSD.org> <20180521134306.GT6887@kib.kiev.ua> <CABh_MKkWOaKZxqye2zW7tGF2Pro6hvnf5PHTgY8HqtHrFCprqg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-------- In message <CABh_MKkWOaKZxqye2zW7tGF2Pro6hvnf5PHTgY8HqtHrFCprqg@mail.gmail= .com> , Ed Schouten writes: >2018-05-21 15:43 GMT+02:00 Konstantin Belousov <kostikbel@gmail.com>: >> Why not add %m instead ? It is very easy and several people did it in >> round-about ways. > >Added advantage of that approach is that it allows the syslog() >function to be simplified significantly. No need to expand the %m >there, which ends up being quite messy. We have an cleanly expandable printf implementation for exactly this kind of stuff, so that is not really the case. However, expandable printf is close to useless when there is no sane/portable way to teach compilers about new formatting arguments. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= .
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5221.1526981838>