Skip to content

Commit

Permalink
cppcheck: Silence false positive 'arithmetic on a nullptr' check.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Apr 8, 2019
1 parent 75883e2 commit 34e3826
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mythtv/libs/libmythui/lirc_client.c
Expand Up @@ -1866,6 +1866,12 @@ int lirc_nextcode(struct lirc_state *state, char **code)
}
/* copy first line to buffer (code) and move remaining chars to
state->lirc_buffers start */

// Cppcheck doesn't parse the previous loop properly. The
// only way for the loop to exit and execute the next line of
// code is if end becomes non-null.
//
// cppcheck-suppress nullPointerArithmeticRedundantCheck
end++;
end_len=strlen(end);
c=end[0];
Expand Down

0 comments on commit 34e3826

Please sign in to comment.