From ab20e91dccb8ec06583f3f8c1bf5b0cc8bfd9e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 22 Aug 2023 13:53:07 +0200 Subject: [PATCH] CI: Fix selfcheck cppcheck warnings --- addons/test/misra/misra-test-avr8.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/test/misra/misra-test-avr8.c b/addons/test/misra/misra-test-avr8.c index a552ac09c66..faa6eb6b615 100644 --- a/addons/test/misra/misra-test-avr8.c +++ b/addons/test/misra/misra-test-avr8.c @@ -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;