misra: Fixed a crash in rule 8.2 (#3208)
Due to incorrect indentation, we return "None" instead of an empty list, which causes the crash. The problem was reported on the forum: https://sourceforge.net/p/cppcheck/discussion/general/thread/e146b8d779/
This commit is contained in:
parent
5a7e361442
commit
fce3db8b7d
|
@ -8,6 +8,8 @@
|
||||||
#include <file,.h> // 20.2
|
#include <file,.h> // 20.2
|
||||||
#include "file,.h" // 20.2
|
#include "file,.h" // 20.2
|
||||||
|
|
||||||
|
#include "misra-test.h"
|
||||||
|
|
||||||
#include /*abc*/ "file.h" // no warning
|
#include /*abc*/ "file.h" // no warning
|
||||||
/*foo*/#include "file.h" // no warning
|
/*foo*/#include "file.h" // no warning
|
||||||
#include "./file.h" // no warning
|
#include "./file.h" // no warning
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#ifndef MISRA_TEST_H
|
#ifndef MISRA_TEST_H
|
||||||
#define MISRA_TEST_H
|
#define MISRA_TEST_H
|
||||||
struct misra_h_s { int foo; };
|
struct misra_h_s { int foo; };
|
||||||
|
bool test(char *a);
|
||||||
#endif // MISRA_TEST_H
|
#endif // MISRA_TEST_H
|
||||||
|
|
Loading…
Reference in New Issue