<div dir="ltr"><div>Luckily I think it is an easy one. Checking if an unsigned value is less than 0.</div><div><br></div><div>Look back in the history. Ryan may have fixed it once and you just accidentally </div><div>reverted it. He fixed a handful like this. </div><div><br></div><div>I'm sorry you were the first to be caught by it but I am thrilled to have Coverity </div><div>run automatically about midnight Central time every night if there were any </div><div>changes to the RSB or RTEMS repos. Then it sends an email to build@ if</div><div>any new issues turned up. Definitely progress has been made here.</div><div><br></div><div>--joel</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 12, 2021 at 7:22 AM Daniel Hellstrom <<a href="mailto:daniel@gaisler.com">daniel@gaisler.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>yes, it must have, so I will look into that.</p>
    <p>/Daniel<br>
    </p>
    <div>
      <pre>      
</pre>
    </div>
    <div>On 2021-03-12 14:07, Joel Sherrill
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">Without looking, I would assume this was
        introduced by Daniel's recent patches.</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">---------- Forwarded message
          ---------<br>
          From: <span dir="auto"><<a href="mailto:scan-admin@coverity.com" target="_blank">scan-admin@coverity.com</a>></span><br>
          Date: Fri, Mar 12, 2021, 12:55 AM<br>
          Subject: New Defects reported by Coverity Scan for RTEMS<br>
          To: <<a href="mailto:build@rtems.org" target="_blank">build@rtems.org</a>><br>
        </div>
        <br>
        <br>
        Hi,<br>
        <br>
        Please find the latest report on new defect(s) introduced to
        RTEMS found with Coverity Scan.<br>
        <br>
        1 new defect(s) introduced to RTEMS found with Coverity Scan.<br>
        <br>
        <br>
        New defect(s) Reported-by: Coverity Scan<br>
        Showing 1 of 1 defect(s)<br>
        <br>
        <br>
        ** CID 1473629:  Control flow issues  (NO_EFFECT)<br>
        /bsps/shared/grlib/can/grcanfd.c: 323 in grcan_hw_write_try_fd()<br>
        <br>
        <br>
________________________________________________________________________________________________________<br>
        *** CID 1473629:  Control flow issues  (NO_EFFECT)<br>
        /bsps/shared/grlib/can/grcanfd.c: 323 in grcan_hw_write_try_fd()<br>
        317                             bds = 1;<br>
        318                     if (space_left < bds)<br>
        319                             break;<br>
        320     <br>
        321                     /* Convert and write CAN message to DMA
        buffer */<br>
        322                     dlc = grcan_len2dlc(source->len);<br>
        >>>     CID 1473629:  Control flow issues  (NO_EFFECT)<br>
        >>>     This less-than-zero comparison of an unsigned
        value is never true. "dlc < 0".<br>
        323                     if (dlc < 0) {<br>
        324                             /* Bad user input. Report the
        number of written messages<br>
        325                              * or an error when non sent.<br>
        326                              */<br>
        327                             if (ret <= 0)<br>
        328                                     return GRCAN_RET_INVARG;<br>
        <br>
        <br>
________________________________________________________________________________________________________<br>
        To view the defects in Coverity Scan visit, <a href="https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypUUzi-2FdSNmuyRB7BEFT8xQ4-2B8hpujh0hTgQljRGId4Dg-3D-3DVX3j_EU3W9teASMK00lBXX9WT4lsogDrkCcNZLvg-2FVxwAXMppdCoTOdWUHKtQLrEQ1MfSyaNP2M1HWoDjjoKTjy-2FIq1HdvVcL1npIuQDJWa-2FDWEQ-2FAOQo8VzAxUCWwGfT9lbXVNqnU0jQl-2FWSYNQAJPY2Tylmw5hG5KcV6hC39VfLDFtSor5xgUxBh-2BcdibW34mNQFj7qSSTl6hW9DF4ywtf1oYStmZyjbwIV0D1AeB2dPto-3D" rel="noreferrer noreferrer" target="_blank">https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypUUzi-2FdSNmuyRB7BEFT8xQ4-2B8hpujh0hTgQljRGId4Dg-3D-3DVX3j_EU3W9teASMK00lBXX9WT4lsogDrkCcNZLvg-2FVxwAXMppdCoTOdWUHKtQLrEQ1MfSyaNP2M1HWoDjjoKTjy-2FIq1HdvVcL1npIuQDJWa-2FDWEQ-2FAOQo8VzAxUCWwGfT9lbXVNqnU0jQl-2FWSYNQAJPY2Tylmw5hG5KcV6hC39VfLDFtSor5xgUxBh-2BcdibW34mNQFj7qSSTl6hW9DF4ywtf1oYStmZyjbwIV0D1AeB2dPto-3D</a><br>
        <br>
        _______________________________________________<br>
        build mailing list<br>
        <a href="mailto:build@rtems.org" rel="noreferrer" target="_blank">build@rtems.org</a><br>
        <a href="http://lists.rtems.org/mailman/listinfo/build" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/build</a><br>
      </div>
    </blockquote>
  </div>

</blockquote></div></div>