CI: Fix selfcheck cppcheck warnings (#5359)
This commit is contained in:
parent
5a136c3f38
commit
18b526b08a
|
@ -1,15 +1,15 @@
|
||||||
// To test:
|
// 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)
|
static void misra_10_4(void)
|
||||||
{
|
{
|
||||||
// #10480
|
// #10480
|
||||||
const char buf[1] = {'f'};
|
const char buf1[1] = {a};
|
||||||
const char c = '0';
|
const char c = '0';
|
||||||
x = buf[0] - c;
|
x = buf1[0] - c;
|
||||||
|
|
||||||
const char buf[2] = {0};
|
const char buf2[2] = {x,y};
|
||||||
x = 'a' == buf[0]; // no-warning
|
x = 'a' == buf2[0]; // no-warning
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int t;
|
int t;
|
||||||
|
|
Loading…
Reference in New Issue