LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PC-LINT

Does anyone have a lnt file for CVI or can recommend one of the examples that comes with pc-lint?

 

I would like to use lint since the compilier didn't even flag the following and I am wondering what else is not being flagged!

char a = 1024;

0 Kudos
Message 1 of 2
(3,166 Views)

Which version of CVI are you using? Versions after 2013 (inclusive) use the Clang compiler, which has a large number of warnings you can turn on. I normally run with all warnings enabled apart from the exceptions below.

 

Your code snippit would be caught by the "Constant conversion" warning. The compiler warning would be " warning: implicit conversion from 'int' to 'char' changes value from 1024 to 0".

 

warnings.png

 

0 Kudos
Message 2 of 2
(3,137 Views)