fenugrec / freediag

OBD2 scantool
GNU General Public License v3.0
338 stars 75 forks source link

cppcheck: remove knownConditionTrueFalse suppression #77

Closed fenugrec closed 2 years ago

fenugrec commented 2 years ago

cppcheck-2.6 can't follow the sequence


    msg = msg->next;
    if (msg == NULL) {
        return CMD_OK;
    }

    msg = msg->next;
    if (msg == NULL) {
        return CMD_OK;
    }

in scantool_850.c:1232 .

see https://sourceforge.net/p/cppcheck/discussion/general/thread/7ff3948cbc/ and its ticket (fixed and included in cppcheck-2.7) https://trac.cppcheck.net/ticket/10649

When cppcheck 2.7 eventually lands in more distros, we can remove the suppression. e.g. https://tracker.debian.org/pkg/cppcheck

fenugrec commented 2 years ago

was fixed in b2bdf9cb