Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Fix selfcheck cppcheck warnings #5359

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions addons/test/misra/misra-test-avr8.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// To test:
// ~/cppcheck/cppcheck--dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test-avr8.c --std=c89 --platform=avr8 && python3 ../misra.py -verify misra/misra-test-avr8.c.dump
// ~/cppcheck/cppcheck--dump -DDUMMY --suppress=uninitvar misra/misra-test-avr8.c --std=c89 --platform=avr8 && python3 ../misra.py -verify misra/misra-test-avr8.c.dump

static void misra_10_4(void)
{
// #10480
const char buf[1] = {'f'};
const char buf1[1] = {a};
const char c = '0';
x = buf[0] - c;
x = buf1[0] - c;

const char buf[2] = {0};
x = 'a' == buf[0]; // no-warning
const char buf2[2] = {x,y};
x = 'a' == buf2[0]; // no-warning

typedef struct {
int t;
Expand Down
Loading