10-16-2015 02:30 AM
In CVI2015, when I write
for(int i=0; i<max; i++) { }
and so I declare the variable i while initializing it, I get the following compiler warning
variable 'i' may be uninitialized when used here
I don't think the warning has a reason; and in CVI 2012 the warning is not shown.
Is this a bug?
10-21-2015 02:12 AM
Hello vix!
Unfortunately I'm not able reproduce the incorrect error that you reported.
I suspect that the for-loop is part of a larger context, which could give us a clue why you are getting that warning.
Can you send us the code of the entire function that you used?
Regards,
- Johannes
10-22-2015 01:22 AM
Hello Johannes,
I think you're right.
In my code the for() loop is inside a switch{} and I need to deeper investigate and try to create a small example which reproduces the problem.
I let you know