CWARN.PASSBYVALUE.ARGFunction argument passed by value is too largeThe CWARN.PASSBYVALUE.ARG checker finds instances in which a function argument passed by value is too large. Vulnerability and riskPassing by value is not necessarily an error, but it can cause a performance loss because of the amount of data copied. Vulnerable code example1 struct strcture{ 2 int x[20]; 3 char y[100]; 4 int z[20]; 5 }; 6 7 void foo(strcture arg) 8 {} Klocwork flags line 7, in which the argument arg is too large. Related checkers |