Home > Back-end >  Cppcheck static checking tools did not check out my code not return a value, how to do?
Cppcheck static checking tools did not check out my code not return a value, how to do?

Time:04-04

Recently wrote a function, forgot to return values, but using cppcheck TscanCode and tencent are not detected, really speechless,

I just write a function:

int num;

Int * myTest (void)

{

& Num.

}

In fact the function returns the num address on intention, forgot to write the return result, but

Static testing is not to come out,



=================added=========

Many people doubt that why I don't have to GCC comes, the features of the detection of

In fact is this:

Project is particularly big, the previous code (legacy) have a lot of warning, so the GCC alarm to open, our own warning that part of the code will be submerged in the warning of history is hard to pick out, so we want to find a tool to specify the inspection of our own folder code, others we went no matter (too much, did not dare to move, afraid to get out of the bug).

CodePudding user response:

Used cppcheck, but the wording, won't compile error
  • Related