3 ms·
gcc also doesn't detect the unused variable. Looking at the -Wunused warning description it does so correctly since a variable is considered unused if it is dec
by nocsaer1 11y ago
gcc also doesn't detect the unused variable. Looking at the -Wunused warning description it does so correctly since a variable is considered unused if it is declared only. In this case it is also used as a parameter.
To detect it, split the recursive function into two, one that recurses and one that does the job at the end. Both can take the same relevant arguments and the latter function will detect any unused parameters.