<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Laurențiu</p>
    <p>thanks for the reproducer. Posted at
      <a class="moz-txt-link-freetext" href="https://trac.cppcheck.net/ticket/14895">https://trac.cppcheck.net/ticket/14895</a> with a bisection to the
      commit that introduced the regression</p>
    <p>I've tried to rework slightly the case to avoid the false
      positive, but didn't manage</p>
    <p>Even</p>
    <div class="moz-cite-prefix">Le 06/07/2026 à 11:54, Laurențiu Nicola
      via PROJ a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:8d3954dc-2a33-4a90-ad5c-6ee1ab3c3ae1@betaapp.fastmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <title></title>
      <div style="font-family:Arial;">Hi Javier,</div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">It looks like a regression in
        cppcheck 2.22-dev (2.21 works). I minimized it to:</div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">extern bool f();</div>
      <div style="font-family:Arial;">int main() {</div>
      <div style="font-family:Arial;">    bool datumAdded = false;</div>
      <div style="font-family:Arial;">    if (f()) {</div>
      <div style="font-family:Arial;">        if (f()) return 1;</div>
      <div style="font-family:Arial;">        if (f()) datumAdded =
        true;</div>
      <div style="font-family:Arial;">    }</div>
      <div style="font-family:Arial;">    if (datumAdded); // style:
        Condition 'datumAdded' is always false<br>
      </div>
      <div style="font-family:Arial;">}</div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">I wanted to report it, but I
        honestly don't feel like dealing with their registration process
        (see what I mean about the OSGeo mantra, strk?).</div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">Daniel, please take a look at the
        snippet above or, if not, create an account for me:</div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">   
        <a class="moz-txt-link-freetext" href="lnicola:$2y$10$K2I2FWFyLHMGZh/CYsMaTO4g3N1PzeN37JAo85616xmwMCnb7HiyW">lnicola:$2y$10$K2I2FWFyLHMGZh/CYsMaTO4g3N1PzeN37JAo85616xmwMCnb7HiyW</a><br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">Laurentiu</div>
      <div style="font-family:Arial;"><br>
      </div>
      <div>On Mon, Jul 6, 2026, at 10:26, Javier Jimenez Shaw via PROJ
        wrote:</div>
      <blockquote type="cite" id="qt" style="">
        <div dir="ltr">
          <div>After updating my repo to upstream, I get this error</div>
          <div><br>
          </div>
          <div><a
href="https://github.com/jjimenezshaw/PROJ/actions/runs/28773629301/job/85312573467"
              moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/jjimenezshaw/PROJ/actions/runs/28773629301/job/85312573467</a></div>
          <div><br>
          </div>
          <div>
            <div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
                  class="font" style="font-family:monospace;"><span
                    class="qt-gmail-">Cppcheck 2.22 dev</span></span></div>
            </div>
            <div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
                  class="font" style="font-family:monospace;"><span
                    class="qt-gmail-">Running cppcheck on
                    /home/runner/work/PROJ/PROJ/./scripts/../src... (can
                    be long)</span></span></div>
            </div>
            <div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
                  class="font" style="font-family:monospace;"><span
                    class="qt-gmail-">/home/runner/work/PROJ/PROJ/src/iso19111/<a class="moz-txt-link-freetext" href="io.cpp:7259,style,knownConditionTrueFalse,Condition">io.cpp:7259,style,knownConditionTrueFalse,Condition</a>
                    '!datumAdded' is always true</span></span></div>
            </div>
            <div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
                  class="font" style="font-family:monospace;"><span
                    class="qt-gmail-">knownConditionTrueFalse check
                    failed</span></span></div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
class="qt-gmail-CheckStep-line-content qt-gmail-d-inline-block qt-gmail-flex-auto qt-gmail-tmp-ml-3 qt-gmail-js-check-line-content"><span
                    class="qt-gmail-"></span></span><br>
              </div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
class="qt-gmail-CheckStep-line-content qt-gmail-d-inline-block qt-gmail-flex-auto qt-gmail-tmp-ml-3 qt-gmail-js-check-line-content"><span
                    class="qt-gmail-">Is it a false positive?</span></span></div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
class="qt-gmail-CheckStep-line-content qt-gmail-d-inline-block qt-gmail-flex-auto qt-gmail-tmp-ml-3 qt-gmail-js-check-line-content"><span
                    class="qt-gmail-"></span></span><br>
              </div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
class="qt-gmail-CheckStep-line-content qt-gmail-d-inline-block qt-gmail-flex-auto qt-gmail-tmp-ml-3 qt-gmail-js-check-line-content"><span
                    class="qt-gmail-">In </span></span><a
href="https://github.com/OSGeo/PROJ/actions/runs/28773631888/job/85312581973"
                  moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/OSGeo/PROJ/actions/runs/28773631888/job/85312581973</a>
                the failure is there, but the test is green.</div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><br>
              </div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
class="qt-gmail-CheckStep-line-content qt-gmail-d-inline-block qt-gmail-flex-auto qt-gmail-tmp-ml-3 qt-gmail-js-check-line-content"><span
                    class="qt-gmail-">Am I missing anything?</span></span></div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
class="qt-gmail-CheckStep-line-content qt-gmail-d-inline-block qt-gmail-flex-auto qt-gmail-tmp-ml-3 qt-gmail-js-check-line-content"><span
                    class="qt-gmail-"></span></span><br>
              </div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
class="qt-gmail-CheckStep-line-content qt-gmail-d-inline-block qt-gmail-flex-auto qt-gmail-tmp-ml-3 qt-gmail-js-check-line-content"><span
                    class="qt-gmail-">Thank you</span></span></div>
              <div
class="qt-gmail-js-check-step-line qt-gmail-CheckStep-line qt-gmail-d-flex qt-gmail-log-line-plain"><span
class="qt-gmail-CheckStep-line-content qt-gmail-d-inline-block qt-gmail-flex-auto qt-gmail-tmp-ml-3 qt-gmail-js-check-line-content"><span
                    class="qt-gmail-">Javier</span></span></div>
            </div>
          </div>
        </div>
        <div>_______________________________________________</div>
        <div>PROJ mailing list</div>
        <div><a href="mailto:PROJ@lists.osgeo.org"
            moz-do-not-send="true" class="moz-txt-link-freetext">PROJ@lists.osgeo.org</a></div>
        <div><a href="https://lists.osgeo.org/mailman/listinfo/proj"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/proj</a></div>
        <div><br>
        </div>
      </blockquote>
      <div style="font-family:Arial;"><br>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.
LLMs contribute to global warming and brain rot</pre>
  </body>
</html>