terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.81k stars 246 forks source link

Wrong PARAM count for void type in C/C++ #368

Closed jdehaan closed 3 months ago

jdehaan commented 1 year ago

Taking a file test.c with following content:

void f(void) {}

Lizard outputs

================================================
  NLOC    CCN   token  PARAM  length  location  
------------------------------------------------
       1      1      6      1       1 f@2-2@./test.c

PARAM is 1 where it should be zero... void is considered as a parameter but it denotes in C the absence of any argument.