This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/14254] New: __wur on scanf and related functions is wrong


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]