Use this tag when question is related to unused functions issues as warnings
Questions tagged [unused-functions]
18 questions
5
votes
2 answers
Xcode complains about Unused functions that are used
I have a "MyConstants.h" file that is imported by several classes.
Inside that file I have things like:
static BOOL isIndexValid(NSInteger index) {
return ((index >=0) && (index < 200));
}
This function is extensively used by the classes…

Duck
- 34,902
- 47
- 248
- 470
4
votes
2 answers
Java - find methods used only in test (unused in source code)
Unused methods have warning for unused and can be removed, e.g. in Eclipse
The method myMethod() from the type MyClass is never used locally
But sometimes you write code with its unit test and afterwards code isn't used (or removed) in production,…

Ori Marko
- 56,308
- 23
- 131
- 233
2
votes
1 answer
Unused let expression in Ocaml
Why can't I compile a program with unused variables in Ocaml?
let foo a b = a + b
--
Error (warning 32 [unused-value-declaration]): unused value foo.

bitorhugo
- 35
- 6
2
votes
0 answers
How to gray out unused C++ variables in VSCode?
VSCode grays out unused variables/imports in JS and TS files.
I use VSCode for writing C++ code also and I have the C/C++ extension installed too.
I want VSCode to also gray out unused C++ variables in my code and maybe also show a warning (if…

Smile001
- 147
- 3
- 9
2
votes
0 answers
Error in (function () : unused arguments (height = 8, width = 8)
I am trying to plot my mean-variance plot using the mvabund package in R.
The line of script that doesn't work is:
meanvar.plot(dat_mvabund, legend = TRUE)
I never had any problems with it but now I get an error message like this:
Error in…

Jadranka Nappi
- 21
- 3
1
vote
1 answer
Warning for unused member functions
While developing my software, I declared many class functions that are not called anymore.
Now, I would like to tidy my sources, and get rid of those declarations.
GCC can detect unused variables, but is there a GCC option to detect unused class…

Saint-Martin
- 306
- 3
- 16
1
vote
1 answer
Intellij - Spring Retry @Recover method marked as unused
When using Spring Retry @Recover method (which works ok) IntelliJ always marking method as unused and suggest to safe delete
@Recover
public void recover(RetryableException e, String param1) {
//recover
}
@Retryable(include =…

Jmeter Tea
- 15
- 1
- 6
1
vote
0 answers
Combining callcatcher and cmake
My aim is to find procedures in our large and old codebase that are never called.
Our code, called neci, is mostly Fortran and some C/C++ code.
From the top answer to this question I stumbled over the wonderful tool callcatcher but I have…

mcocdawc
- 1,748
- 1
- 12
- 21
0
votes
0 answers
How to identify unused methods, codes, libraries and references in VScode
Team,
I need to identify & remove unused variables (arguments, local variables, class member variables), Libraries, and references that are unused in VS code.
I have also tried to find out some extensions or plugins or Nuget packages but no luck and…

Chetan Sanghani
- 2,058
- 2
- 21
- 36
0
votes
0 answers
link waring when using '-Wl, -dead_strip'
using '-Wl, -dead_strip' can remove functions and data that are unreachable by the entry point or exported symbols.
When I add '-Wl, -dead_strip' for link, got a warning:
warning: cannot find entry symbol ad-strip; defaulting to 000000008000003c
and…

Beny
- 1
0
votes
0 answers
Error performing LD clumping on SNP data using R TwoSampleMR
I am to perform LD clumping on SNP data using R TwoSampleMR and I am getting the following error message:
Exp_Out_Harmonized_Clumped < -clump_data(harmonized,clump_kb = 10000,clump_r2 = 0.1,clump_p1 = 1,clump_p2 = 1,pop = "AFR")
Error in…
0
votes
0 answers
ESLint rule for unused imports, is it possible to ignore few imports out of many?
i am using un-used imports rule to list all un-used imports from all files.
but we have few imports which are un-used but those should stay.
so wondering, is it possible ignore few un-used imports?
this is the rule i am using:
rules: {
…

L V Prasad
- 145
- 1
- 2
- 12
0
votes
0 answers
Remove unused python files from a python project in VSCode
I have a python project in VSCode that I've modified / overhauled 3 times as I've learnt to build it 'better' along the journey.
I now have python files that are no longer used by the application but am unable to audit ...without hours of hard…

nodeidea
- 1
0
votes
1 answer
kotlin AlertDialog button doesn't run lambda or function stored in variable
I'm trying to create a new class that helps create AlertDialog messages. This class consists of a function that collects all parameters (title, content/text, buttons) and shows the popup automaically.
fun createPopupMessage(
context: Context, …

Jãoum-VPS
- 3
- 3
0
votes
1 answer
Ignore "unused" warning in Swift when use a "pointer" to func?
I know that I should use @discardableResult. So I have the following code:
@discardableResult func someFunc() { ... }
Then I just call it:
someFunc()
But if I have and use a pointer to this method then it doesn't work again. For example:
let…

Vyachaslav Gerchicov
- 2,317
- 3
- 23
- 49