Top "Unused-variables" questions

Use this tag when question related to unused variables issues as warnings

How can I get rid of an "unused variable" warning in Xcode?

I understand exactly why unused variable warnings occur. I don't want to suppress them in general, because they are incredibly …

objective-c xcode compiler-warnings unused-variables
Unused parameter in c++11

In c++03 and earlier to disable compiler warning about unused parameter I usually use such code: #define UNUSED(expr) do { (…

c++ c++11 unused-variables
Silence PyLint warning about unused variables for string interpolation

The say module brings string interpolation to Python, like this: import say def f(a): return say.fmt("The value …

python pylint unused-variables
Mark unused parameters in Kotlin

I am defining some functions to be used as callbacks and not all of them use all their parameters. How …

suppress-warnings kotlin unused-variables
Standard conventions for indicating a function argument is unused in JavaScript

Are there any standard ways of marking a function argument as unused in JavaScript, analogous to starting a method argument …

javascript naming-conventions unused-variables
Skip type check on unused parameters

When I compile my typescript project, I'm using the noImplicitAny option so that I won't forget to specify the types …

typescript unused-variables
“Variable is never assigned” warning in IntelliJ IDEA can be suppressed only "partially"

Java EE + IntelliJ Idea 2016.3: I've written a class and declared a private field with a @Inject annotation. I have successfully …

java intellij-idea code-inspection unused-variables
Why do underscore prefixed variables exist?

I am learning Rust, and came across the fact that adding an underscore at the beginning of a variable name …

variables rust unused-variables
How to detect unused variables in Typescript?

Is there a way to detect unused variables in Typescript (something like ESLint in Javascript)?

typescript lint unused-variables
Removing Unused parameters warning in QtCreator

I added this to my .pro file but I stil get warnings : QMAKE_CXXFLAGS_WARN_OFF = -Wunused-parameter

c gcc qt-creator unused-variables