[RTEMS Project] #4277: grtc.c: Missing break in switch error spotted by Coverity
RTEMS trac
trac at rtems.org
Mon Mar 1 20:22:13 UTC 2021
#4277: grtc.c: Missing break in switch error spotted by Coverity
------------------------+--------------------
Reporter: Ryan Long | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone: 6.1
Component: bsps | Version: 6
Severity: normal | Keywords:
Blocked By: | Blocking:
------------------------+--------------------
CID 1399761: Missing break in switch in process_dma().
CID 1399765: Missing break in switch in process_dma().
CID 1399766: Missing break in switch in process_dma().
CID 1399777: Missing break in switch in process_dma().
CID 1399761
{{{
1366 pDev->frm = NULL;
1367 pDev->frame_state = FRM_STATE_HDR;
1368
CID 1399761: Missing break in switch (MISSING_BREAK) [select issue]
fallthrough: The above case falls through to this one.
1369 case FRM_STATE_HDR:
1370 DBG2("FRAME_STATE_HDR\n");
}}}
CID 1399765
{{{
1450 pDev->frame_state = FRM_STATE_PAYLOAD;
1451 pDev->frm = frm;
1452
1453 case FRM_STATE_PAYLOAD:
1454 DBG2("FRAME_STATE_PAYLOAD\n");
}}}
CID 1399766
{{{
1450 pDev->frame_state = FRM_STATE_PAYLOAD;
1451 pDev->frm = frm;
1452
CID 1399766 (#1 of 1): Missing break in switch
(MISSING_BREAK)unterminated_case: The case for value FRM_STATE_PAYLOAD is
not terminated by a break statement.
1453 case FRM_STATE_PAYLOAD:
1454 DBG2("FRAME_STATE_PAYLOAD\n");
}}}
CID 1399767
{{{
1354 switch( pDev->frame_state ) {
CID 1399777 (#1 of 1): Missing break in switch
(MISSING_BREAK)unterminated_case: The case for value FRM_STATE_NONE is not
terminated by a break statement.
1355 case FRM_STATE_NONE:
1356 DBG2("FRAME_STATE_NONE\n");
1357
1358 /* Find Start of next frame by searching for 0x01 */
1359 ret = grtc_hw_find_frm(pDev);
1360 if ( ret != 0 ) {
1361 /* Frame start not found */
1362 return 0;
1363 }
1364
1365 /* Start of frame found, Try to copy header */
1366 pDev->frm = NULL;
1367 pDev->frame_state = FRM_STATE_HDR;
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/4277>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list