File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3338,7 +3338,8 @@ def misra_17_3(self, cfg):
3338
3338
end_token = token .next .link
3339
3339
while tok != end_token :
3340
3340
if tok .isName and tok .function is None and tok .valueType is None and tok .next .str == "(" and \
3341
- tok .next .valueType is None and not isKeyword (tok .str ) and not isStdLibId (tok .str ):
3341
+ tok .next .valueType is None and not isKeyword (tok .str ) and not isStdLibId (tok .str ) and \
3342
+ not re .match (r'U?INT(_MAX|)(8|16|32|64)_C' , tok .str ):
3342
3343
self .reportError (tok , 17 , 3 )
3343
3344
break
3344
3345
tok = tok .next
Original file line number Diff line number Diff line change @@ -1809,6 +1809,10 @@ static void misra_17_3(void) {
1809
1809
if (dostuff ()) {}
1810
1810
}
1811
1811
1812
+ static void misra_17_3_compliant (uint32_t x ) {
1813
+ if (x == UINT32_C (1 )){ } // no warning for 17_3
1814
+ }
1815
+
1812
1816
static void misra_config (const char * str ) {
1813
1817
if (strlen (str ) > 3 ){} //10.4
1814
1818
if (sizeof (int ) > 1 ){} //10.4
You can’t perform that action at this time.
0 commit comments