NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/53029: src/sys/dev/hdaudio/hdafg.c:1267: dead code block ?



>Number:         53029
>Category:       kern
>Synopsis:       src/sys/dev/hdaudio/hdafg.c:1267: dead code block ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 14 14:25:00 +0000 2018
>Originator:     David Binderman
>Release:        cvs-20180214
>Organization:
>Environment:
>Description:
[src/sys/dev/hdaudio/hdafg.c:1268]: (warning) Opposite inner 'if' condition leads to a dead code block.

Source code is

    for (i = sc->sc_startnode; cnt < maxctls && i < sc->sc_endnode; i++) {
        if (cnt >= maxctls) {
            hda_error(sc, "ctl overflow\n");
            break;
        }

Suggest remove dead code.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index