LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

static type check

Solved!
Go to solution

 

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.

0 Kudos
Message 1 of 4
(4,078 Views)
Solution
Accepted by Jim88888

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]'

0 Kudos
Message 2 of 4
(4,075 Views)

Thank you very much for your reply. I'm using CVI2012, I opened all check mode, as the following picture shows:

ScreenHunter_1.PNG

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.

0 Kudos
Message 3 of 4
(4,069 Views)

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.

0 Kudos
Message 4 of 4
(4,061 Views)