https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68767
--- Comment #3 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #2) > I don't understand. It is indeed passing NULL to a non-null function. What > is wrong with the warning? When you look at the original testcase closely, you'll see that it can never (unless there is a race condition, invoking undefined behaviour) pass NULL. In fact, it always passes "lstr" . The the reduced testcase from comment #1 is more ambiguous. If it can or can not pass NULL depends on values that the variable might attain.