This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Marking of functions with attributes like __wur
On 04/12/2012 06:19 PM, Roland McGrath wrote:
I'm afraid that standard would be too generous, as it would permit
too many false positives. A better standard would be something like
"in practice, a warning is far more likely to be a helpful
diagnostic than a false alarm".
Agreed.
So, is this a good go for a policy:
"This is useful for functions where not checking the result is either a
security problem or always a bug such as realloc.
This flag might not be set if the check for failure can be done in other
ways, e.g. the return value of fwrite can be check with ferror as well.
Only apply it where in practice, a warning is far more likely to be a
helpful diagnostic than a false alarm."
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126