[coreboot] New Defects reported by Coverity Scan for coreboot

scan-admin at coverity.com scan-admin at coverity.com
Fri Aug 26 13:28:03 CEST 2016


Hi,

Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.

2 new defect(s) introduced to coreboot found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1361947:  Code maintainability issues  (UNUSED_VALUE)
/src/arch/riscv/trap_handler.c: 37 in handle_supervisor_call()


________________________________________________________________________________________________________
*** CID 1361947:  Code maintainability issues  (UNUSED_VALUE)
/src/arch/riscv/trap_handler.c: 37 in handle_supervisor_call()
31     			printk(BIOS_DEBUG, "Getting hart id...\n");
32     			returnValue = read_csr(mhartid);
33     			break;
34     		case SBI_ECALL_NUM_HARTS:
35     			/* TODO: parse the hardware-supplied config string and
36     			   return the correct value */
>>>     CID 1361947:  Code maintainability issues  (UNUSED_VALUE)
>>>     Assigning value "1ULL" to "returnValue" here, but that stored value is overwritten before it can be used.
37     			returnValue = 1;
38     		case SBI_ECALL_CONSOLE_PUT:
39     			returnValue = mcall_console_putchar(arg0);
40     			break;
41     		case SBI_ECALL_SEND_DEVICE_REQUEST:
42     			printk(BIOS_DEBUG, "Sending device request...\n");

** CID 1361946:  Control flow issues  (MISSING_BREAK)
/src/arch/riscv/trap_handler.c: 38 in handle_supervisor_call()


________________________________________________________________________________________________________
*** CID 1361946:  Control flow issues  (MISSING_BREAK)
/src/arch/riscv/trap_handler.c: 38 in handle_supervisor_call()
32     			returnValue = read_csr(mhartid);
33     			break;
34     		case SBI_ECALL_NUM_HARTS:
35     			/* TODO: parse the hardware-supplied config string and
36     			   return the correct value */
37     			returnValue = 1;
>>>     CID 1361946:  Control flow issues  (MISSING_BREAK)
>>>     The above case falls through to this one.
38     		case SBI_ECALL_CONSOLE_PUT:
39     			returnValue = mcall_console_putchar(arg0);
40     			break;
41     		case SBI_ECALL_SEND_DEVICE_REQUEST:
42     			printk(BIOS_DEBUG, "Sending device request...\n");
43     			returnValue = mcall_dev_req((sbi_device_message*) arg0);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5bYHIvLjJswXzPj-2Bvq1MvSHRu3Ol2XYpwhTJsZpDNggkuDm652t8yyHqXS6h2TQamRqbsZpHyc3fvVFEjUG5es3YIhZXdYpolJdRHwSUDj14Ck2glNabxfCPvskiRkFaoDeghBBS7-2FYX6MLIJJocXxtbHttiK5A2DuUJb88pR42iA-3D-3D

To manage Coverity Scan email notifications for "coreboot at coreboot.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4e-2BpBzwOa5gzBZa9dWpDbzfofODnVj1enK2UkK0-2BgCCqyeem8IVKvTxSaOFkteZFcnohwvb2rnYNjswGryEWCURnUk6WHU42sbOmtOjD-2Bx5c-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5bYHIvLjJswXzPj-2Bvq1MvSHTu01w4hsenA8wcBtuOhMv418NXyR-2BoSji-2F97lufXfqDKGh5df4GCQXtCR9W0AJXU3Ldzd6RpH0sfD7IY5BOSbNvN941qwe1n0Y3-2FUTx4webBeISvS22d8yTVJ7J51deIuy7ks1f9FwbvdfVtZrCOFg-3D-3D




More information about the coreboot mailing list