On 2020/04/30 06:45, Alexandre Ratchov wrote:
> CVSROOT:      /cvs
> Module name:  src
> Changes by:   ratc...@cvs.openbsd.org 2020/04/30 06:45:52
> 
> Modified files:
>       sys/dev/usb    : uaudio.c 
> 
> Log message:
> If there's only one input (output) name it simply "input" ("output")
> 
> Besides making things simpler, this allows libsndio to figure out that
> this is a control affecting all inputs (outputs) that needs to be
> exposed.
> 

as spotted by coverity, case 1 in switch (hi) around line 640 is redundant
with this commit which added "if (hi == 1) return" above.

________________________________________________________________________________________________________
*** CID 1492830:  Control flow issues  (DEADCODE)
/home/didickman/coverity/kernel/sys/dev/usb/uaudio.c: 641 in uaudio_tname()
635                     if (sc->nin == 1)
636                             return "input";
637             }
638     
639             /* determine name from USB terminal type */
640             switch (hi) {
>>>     CID 1492830:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "case 1U:".
641             case 1:
642                     /* usb data stream */
643                     name = isout ? UAUDIO_NAME_REC : UAUDIO_NAME_PLAY;
644                     break;
645             case 2:
646                     /* embedded inputs */


________________________________________________________________________________________________________

Reply via email to