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 libc/14176] New: mblen is erroneously marked warn_unused_result


http://sourceware.org/bugzilla/show_bug.cgi?id=14176

             Bug #: 14176
           Summary: mblen is erroneously marked warn_unused_result
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: antti-juhani@kaijanaho.fi
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


GCC documentation states:

  The warn_unused_result attribute causes a warning to be emitted if a caller
  of the function with this attribute does not use its return value. This is
  useful for functions where not checking the result is either a security
  problem or always a bug, such as realloc.

However, so far as I can see, ignoring the return value of mblen is never a
security problem and is sometimes appropriate (the first call to the function
is often mblen(NULL, 0), the result value of which is usually of no interest).

(This is also reported as Debian #674917, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674917.  The Debian report
logs include a patch, not by me.)

-- 
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]