12-31-2013 01:20 AM
void demo(int a[][64]) { } int main(void) { int b[20][128]; demo(b); return 0; }
Look at this simple source code, LabWindows/CVI's C compiler just let it pass without even a warning! From this we can see how weak the static type check function of LabWindows/CVI is. If there is any switch to open a stronger check mode, please tell me. However, since the compiler speed is already very slow, I think open that function will make it too slower.
Solved! Go to Solution.
12-31-2013 01:35 AM
That depends on the version of CVI and your Build settings... With CVI2013f1 and warning level set to Common I get
warning: incompatible pointer types passing 'int [20][128]' to parameter of type 'int (*)[64]'
12-31-2013 01:57 AM
Thank you very much for your reply. I'm using CVI2012, I opened all check mode, as the following picture shows:
I still got nothing. I'm not very familiar with LabWindows so I'm not sure if there is any other switch. Maybe I should compile the project using another compiler before build CVI project, if it's possible.
At last , thank you again.
Best regards.
12-31-2013 02:42 AM
The major difference between CVI2013 and CVI2012 is that the new version uses a different/better compiler (clang). You can use (an old version of) clang in CVI2012, too, as an external compiler (for the release build).
See here to get started.