File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3849,8 +3849,8 @@ def misra_22_9(self, cfg):
38493849 def misra_22_10 (self , cfg ):
38503850 last_function_call = None
38513851 for token in cfg .tokenlist :
3852- if token .str == '(' and not simpleMatch (token .link , ') {' ):
3853- name , args = cppcheckdata .get_function_call_name_args (token . previous )
3852+ if token .isName and token . next . str == '(' and not simpleMatch (token . next .link , ') {' ):
3853+ name , args = cppcheckdata .get_function_call_name_args (token )
38543854 last_function_call = name
38553855 if token .str == '}' :
38563856 last_function_call = None
Original file line number Diff line number Diff line change @@ -1929,4 +1929,13 @@ static void misra_22_10(void)
19291929 errno = 0 ;
19301930 f = strtod ( "A.12" , NULL );
19311931 if ( 0 == errno ) {}
1932+
1933+ // #10855
1934+ f = strtol (numbuf , 0 , (formatHex == 0U ) ? 0 : 16 );
1935+ if (errno != 0 ) {}
1936+
1937+ // #11752
1938+ #define NULL_PTR ((void*)0)
1939+ f = strtod (inStr , NULL_PTR );
1940+ if (errno != 0 ) {}
19321941}
You can’t perform that action at this time.
0 commit comments