https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96951

--- Comment #5 from kab at acm dot org ---
(In reply to Martin Sebor from comment #3)
> If in the code the test case was derived from the string
> member is not necessarily meant to be a string then declaring it with
> attribute nonstring avoids the warning:

In the original code the string is intended to be a nul-terminated string. 
Also, its in a struct from a system header, so not modifiable.

> As for memccpy...

memccpy isn't so portable (think Windows, which deprecates it, though under the
control of a macro).  The code from the discussion that led here could cope
with that, but that's not universally true.

Reply via email to