|
From: | Todd C. Miller |
Subject: | Re: [Nmh-workers] strncpy(3), die, die, die. |
Date: | Mon, 24 Oct 2016 14:41:21 -0600 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |