On Mon, 24 Oct 2016 19:59:10 -0000, P Vixie wrote:

> I don't know what gcc or clang command line option to use to require this.

If you declare the function with gcc's warn_unused_result attribute
the compiler will warn when you don't check the result.

For example:

    size_t strlcpy(char *dst, const char *src, size_t dstsize)
        __attribute__((warn_unused_result));

 - todd

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to