[PATCH][BZ #14254] Remove wur on scanf et al.
Mike Frysinger
vapier@gentoo.org
Mon Oct 14 18:02:00 GMT 2013
On Tuesday 08 October 2013 11:53:31 Ondřej Bílka wrote:
> This is another bug with simple patch. Accept it or close but we should
> not keep these in indefinite state.
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=14254
the proposed idiom is useful, but so is the warning. it is common place for
people to use scanf funcs w/out checking the return value which means wur is
useful to the wider ecosystem. imo, if you really really don't need to check
the return value (because you're using a trick like %n), then it's easy enough
to do:
if (scanf(....)) {/* we use %n for checking */}
which means i'm in favor of closing the bug as WONTFIX.
we could add a note to the documentation on the topic in the scanf section,
although i'm not sure how useful that'll be in practice.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20131014/25a3d0e8/attachment.sig>
More information about the Libc-alpha
mailing list