9 years, 7 months ago.

LPC1768

Warning: Variable "y" was declared but never referenced in "main.cpp",

How do i solve this?

Thanks

1 Answer

9 years, 7 months ago.

using a text editor - search for the declaration of Variable Y and delete or comment it out. (recompile) also search your main.cpp for any usage of the variable Y. some optimizing compilers (don't know about the mbed compiler" will eliminate (not compile) code that it deems unreachable [ie. conditions specified will never occur so that the code will never be executed). so in your main.cpp if you intended to use variable Y - check the code segment for invalid conditional statements where you specified the variable Y Gary

Accepted Answer