Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Activate unused variable warning
Activate unused variable warning [message #1848894] Wed, 22 December 2021 14:01 Go to next message
Javier Carrasco is currently offline Javier CarrascoFriend
Messages: 3
Registered: December 2021
Junior Member
That should be a very easy one: I just need to see a warning symbol when I declare a variable that is never used. I had a look at
Window -> Preferences -> C/C++ -> Code Analysis
but that problem is not on the list.
Is there any way I could activate that warning? Thanks in advance.
Re: Activate unused variable warning [message #1848938 is a reply to message #1848894] Fri, 24 December 2021 18:49 Go to previous messageGo to next message
David VavraFriend
Messages: 1430
Registered: October 2012
Senior Member
There are options under "Potential Programming Problems"
They don't work?
index.php/fa/41495/0/
Re: Activate unused variable warning [message #1848939 is a reply to message #1848938] Fri, 24 December 2021 19:06 Go to previous messageGo to next message
Javier Carrasco is currently offline Javier CarrascoFriend
Messages: 3
Registered: December 2021
Junior Member
I also thought that "unused variable declaration in file scope" might be the right one, but unfortunately it does not work or at least it does not solve this issue...
Re: Activate unused variable warning [message #1850091 is a reply to message #1848939] Tue, 15 February 2022 14:50 Go to previous message
Javier Carrasco is currently offline Javier CarrascoFriend
Messages: 3
Registered: December 2021
Junior Member
I am still having this problem and as I said, checking "Unused Variable declaration in file scope" is not the solution. I have seen that one could "customize the problem", but I am using the default settings.
I have even tested with with a hello_world.c adding an unused variable and I did not get any warning from Eclipse. The GCC compiler indeed finds the unused variable as expected.
Previous Topic:plugin development in CDT project
Next Topic:CDT has no SEGGER GDB option
Goto Forum:
  


Current Time: Sat Dec 03 06:32:23 GMT 2022

Powered by FUDForum. Page generated in 0.01583 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top