parent
3811d01498
commit
ad4e688ff8
|
@ -495,6 +495,13 @@ def getEssentialTypeCategory(expr):
|
|||
return 'char'
|
||||
return expr.valueType.sign
|
||||
|
||||
if (expr.isCast and expr.str == "("):
|
||||
castTok = expr.next
|
||||
while castTok.isName or castTok.str == "*":
|
||||
if castTok.str == 'char' and not castTok.isSigned and not castTok.isUnsigned:
|
||||
return 'char'
|
||||
castTok = castTok.next
|
||||
|
||||
if expr.valueType:
|
||||
return expr.valueType.sign
|
||||
return None
|
||||
|
|
|
@ -724,6 +724,12 @@ static void misra_10_4(u32 x, s32 y) {
|
|||
if ('\0' == cmd.buf[0]) //no-warning
|
||||
{
|
||||
}
|
||||
|
||||
// #10652
|
||||
char c;
|
||||
if ((char)'1' == c) {} // no warning
|
||||
if ((unsigned char)'1' == c) {} //10.4
|
||||
if ((signed char)'1' == c) {} //10.4
|
||||
}
|
||||
|
||||
static void misra_10_5(uint16_t x) {
|
||||
|
|
Loading…
Reference in New Issue