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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #8 from Jeffrey A. Law <law at gcc dot gnu.org> ---
The warning is meant to catch cases where the compiler can prove there is a
NULL value that flows into either a pointer dereference or into a function
argument where that argument has been declared as never allowed to be NULL.

In this case we have no semantic information about GetWindowsDirectoryA; it's
totally opaque.  So the NULL poiner that gets passed in as PATH in the call to
GetSystemDirectory16 flows into the __builtin_strcpy and we get a warning per
design.

Reply via email to