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-2BfV0V05...
To manage Coverity Scan email notifications for "coreboot@coreboot.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05...