On Wed, May 06, 2015 at 06:45:56PM +0200, Geert Uytterhoeven wrote:
On Wed, May 6, 2015 at 5:59 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:We're doing a lot better these days with zero day build testing. There
We actually do have a __must_check tag so it's easy enough to forcePeople tend to ignore compiler warnings...
people to check. A different option is we could make it trigger a
is not even one ignored __must_check return in my allmodconfig.
It's less subtle than just putting an empty string there so we're moreWARN_ONCE().Which will probably trigger only in extreme cases in the wild, not during
#define strXcpy(dest, src, len) (({ \
ssize_t __ret = strscpy_truncate(dest, src, len); \
WARN_ONCE(__ret < 0, "strXcpy trancates\n"); \
__ret; }))
development.
likely to get bug reports than with the original code.