<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 1/28/26 22:11, Sam James wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:87qzr9oy6z.fsf@gentoo.org">
      <pre wrap="" class="moz-quote-pre">Jacob Bachmeyer <a class="moz-txt-link-rfc2396E" href="mailto:jcb62281@gmail.com"><jcb62281@gmail.com></a> writes:<span
      style="white-space: pre-wrap">
</span></pre>
      <pre wrap="" class="moz-quote-pre">[...]</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">Alternately, is it possible for this code to be reached if keyblock is
NULL?  Perhaps a better solution would be to change the "if (err)" to
"if (err || !keyblock)" or the more verbose "if (err != 0 || keyblock
== NULL)"?  (I assume that quick_find_keyblock always returns an error
if keyblock is NULL upon return, but the analyzer does not know that.)</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
Yes, this is a pattern I saw a few times where it doesn't understand
error-return relations, unfortunately.

It does look into q_f_k, it just isn't able to deduce that they're tied,
even though when looking at it, it seems to be fine.

[...]<span style="white-space: pre-wrap">
</span></pre>
      <pre wrap="" class="moz-quote-pre">I plan on filing some GCC bugs for any analyzer shortcomings we end up
finding so the discussion is interesting, thanks.</pre>
    </blockquote>
    <p>I think that the analyzer being unable to recognize that "!err"
      implies keyblock is non-NULL even though it *does* look inside the
      quick_find_keyblock function is a shortcoming worth a GCC bug
      report because it results in complaints for which maintainers
      could legitimately reject patches, as there is no actual problem.</p>
    <p><br>
    </p>
    <p>-- Jacob</p>
  </body>
</html>