
One new issue since the last time I ran this, and I think after reading the code myself, argc counting / sanity checking should be handled a little more clearly as well. I'm going to take a quick attempt at updating this.
----- Forwarded message from scan-admin@coverity.com -----
Date: Tue, 26 Jan 2021 14:49:09 +0000 (UTC) From: scan-admin@coverity.com To: tom.rini@gmail.com Subject: New Defects reported by Coverity Scan for Das U-Boot
Hi,
Please find the latest report on new defect(s) introduced to Das U-Boot found with Coverity Scan.
1 new defect(s) introduced to Das U-Boot found with Coverity Scan. 11 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s)
** CID 316601: Control flow issues (DEADCODE) /cmd/pwm.c: 76 in do_pwm()
________________________________________________________________________________________________________ *** CID 316601: Control flow issues (DEADCODE) /cmd/pwm.c: 76 in do_pwm() 70 if (argc > 0) { 71 str_channel = *argv; 72 channel = simple_strtoul(str_channel, NULL, 10); 73 argc--; 74 argv++; 75 } else {
CID 316601: Control flow issues (DEADCODE) Execution cannot reach this statement: "return CMD_RET_USAGE;".
76 return CMD_RET_USAGE; 77 } 78 79 if (sub_cmd == PWM_SET_INVERT && argc > 0) { 80 str_enable = *argv; 81 pwm_enable = simple_strtoul(str_enable, NULL, 10);
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0...
To manage Coverity Scan email notifications for "tom.rini@gmail.com", click https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0...
----- End forwarded message -----