This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/14254] New: __wur on scanf and related functions is wrong
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sat, 16 Jun 2012 11:05:59 +0000
- Subject: [Bug stdio/14254] New: __wur on scanf and related functions is wrong
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14254
Bug #: 14254
Summary: __wur on scanf and related functions is wrong
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: stdio
AssignedTo: unassigned@sourceware.org
ReportedBy: bugdal@aerifal.cx
Classification: Unclassified
A perfectly valid idiom for using scanf-family functions is to include %n in
your format string with the corresponding argument variables set in advance to
-1 or similar (so that if the %n is not reached, the program can tell). This is
particularly appropriate when the number of characters read, not the count of
items read, is what's more interesting to the program.
As such, __wur (warn unused result) should be removed from all scanf-family
functions.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.