fenugrec / freediag

OBD2 scantool
GNU General Public License v3.0
329 stars 73 forks source link

cppcheck: remove knownConditionTrueFalse suppression #77

Closed fenugrec closed 1 year 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 1 year ago

was fixed in b2bdf9cb