API Guidelines

For enhancing the public API of glibc, here are a few guidelines.

1. __wur ( "warn unused result") Attribute

GCC warns if a caller of a function marked with attribute "warn_unused_result" does not use its return value.

In glibc, we add this attribute as "__wur" to functions using the following guideline:

This is useful for functions where not checking the result is either a security problem or always a bug. It should be applied where in practice, a warning is far more likely to be a helpful diagnostic than a false alarm.

Examples are:

None: API_Guidelines (last edited 2012-04-20 18:54:21 by AndreasJaeger)