>nmh builds mostly OK under it, and passes 'make check'.  However,
>there's a whole mess of new warnings, which all root-cause to the
>fact that gcc8 apparently does sanity checking on whether the code
>has bounds-checked the length parameter of snprintf() and friends
>before using it, and special-case notification when it's obvious that
>the destination won't get null-terminated.

I'm ... a little confused.  Is the "right" way to deal with that by
doing:

        adr[sizeof(adr) - 1] = '\0';

        strncpy(adr, ap->text, sizeof(adr) - 1);

Or something else?  A quick Google suggests most people "fix" this by
adding -Wno-stringop-truncation to the build options.

--Ken

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to