<div dir="auto">New Coverity issue</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">scan-admin@coverity.com</a>></span><br>Date: Wed, Aug 2, 2023, 12:22 AM<br>Subject: New Defects reported by Coverity Scan for RTEMS<br>To:  <<a href="mailto:build@rtems.org">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 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)<br>
/bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()<br>
<br>
<br>
________________________________________________________________________________________________________<br>
*** CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)<br>
/bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()<br>
311         rv = mcp7940m_i2c_read(ctx, REG_RTCSEC, buf, sizeof(buf));<br>
312       }<br>
313     <br>
314       if (rv == 0) {<br>
315         /* Make sure weekday is in range. Otherwise it's not relevant. */<br>
316         if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1 ||<br>
>>>     CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)<br>
>>>     "((buf[3] & (7U /* 7U << 0U */)) >> 0U) > 7" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".<br>
317             RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) > 7) {<br>
318           buf[REG_RTCWKDAY] &= ~RTCWKDAY_WKDAY_MASK;<br>
319           buf[REG_RTCWKDAY] |= RTCWKDAY_WKDAY(1);<br>
320         }<br>
321     <br>
322         buf[REG_RTCYEAR] &= ~RTCYEAR_YRBCD_MASK;<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-3DcyWG_EU3W9teASMK00lBXX9WT4lsogDrkCcNZLvg-2FVxwAXMpYS-2B09LHsska0uyPzxh7uKKzrgmDf1f3-2BmDhHKIEFAROWH-2BDbWaJf1fkFUy9YO2BWhIOMEtmufkuQdoc6Ezm8QNR6E7LDB49TP6u3-2BSbC-2F41-2Fw23mpQ6qPqQmDGVCjb2ihRuh8TdBC3cxDcbTEcy5EoYr4gqciLZgtCrJFvedzgQ-3D-3D" rel="noreferrer noreferrer" target="_blank">https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypUUzi-2FdSNmuyRB7BEFT8xQ4-2B8hpujh0hTgQljRGId4Dg-3D-3DcyWG_EU3W9teASMK00lBXX9WT4lsogDrkCcNZLvg-2FVxwAXMpYS-2B09LHsska0uyPzxh7uKKzrgmDf1f3-2BmDhHKIEFAROWH-2BDbWaJf1fkFUy9YO2BWhIOMEtmufkuQdoc6Ezm8QNR6E7LDB49TP6u3-2BSbC-2F41-2Fw23mpQ6qPqQmDGVCjb2ihRuh8TdBC3cxDcbTEcy5EoYr4gqciLZgtCrJFvedzgQ-3D-3D</a><br>
<br>
_______________________________________________<br>
build mailing list<br>
<a href="mailto:build@rtems.org" target="_blank" rel="noreferrer">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>