Fixed #11180 (False positive: misra-c2012-8.1 for code 'unsigned x;')
This commit is contained in:
parent
5d5b6bda3a
commit
13c80d6cce
|
@ -1842,7 +1842,7 @@ class MisraChecker:
|
|||
|
||||
def misra_8_1(self, cfg):
|
||||
for token in cfg.tokenlist:
|
||||
if token.isImplicitInt:
|
||||
if token.isImplicitInt and not token.isUnsigned and not token.isSigned:
|
||||
self.reportError(token, 8, 1)
|
||||
|
||||
def misra_8_2(self, data, rawTokens):
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
typedef struct {
|
||||
union { // 19.2
|
||||
struct {
|
||||
unsigned a : 2; // 8.1
|
||||
unsigned a : 2;
|
||||
unsigned : 14;
|
||||
};
|
||||
uint16_t value;
|
||||
|
|
Loading…
Reference in New Issue