Summary: | fwrite must not be declared with the warn_unused_result attribute | ||
---|---|---|---|
Product: | glibc | Reporter: | jim <jim> |
Component: | stdio | Assignee: | Ulrich Drepper <drepper.fsp> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aj, andrey.vihrov, eblake, glibc-bugs, jrnieder |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.13 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | remove fwrite's __wur attribute |
Description
jim@meyering.net
2010-08-30 20:29:38 UTC
Created attachment 4956 [details]
remove fwrite's __wur attribute
This is particularly true since fputc is declared without __wur - consistency demands that both or neither should have the attribute, and I strongly favor neither based on the number of bug reports that have been falsely attributed to gnulib as a result of glibc's header markup on fwrite. For example: http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/22751 See also this gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 where the suggested hammer is to completely disable ALL warn_unused_result checking in order to silence spurious warnings for fwrite(). I'd rather remove the __wur from fwrite than turn off what would otherwise be a useful gcc feature for functions where warning really does make sense. Thanks, your patch has been added to git. *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |