Feb 24, 2013Use -Wno-unused-variable should work. Share.How do I best silence a warning about unused variables?Unused Variable Error in C .. Simple Question - Stack OverflowBest way to suppress C warning "Unused variable x"? [duplicate]How can I suppress "unused parameter" warnings in C?More results from stackoverflow.com
Feb 24, 2013Use -Wno-unused-variable should work. Share.How do I best silence a warning about unused variables?Unused Variable Error in C .. Simple Question - Stack OverflowHow can I suppress "unused parameter" warnings in C?Best way to suppress C warning "Unused variable x"? [duplicate]More results from stackoverflow.com
Sep 28, 2009Unused parameter warnings can simply be suppressed by passing -Wno-unused-parameter to the compiler, but note that this disabling flag must comeĀ How do you disable the unused variable warnings coming out of gcc Unused Variable Error in C .. Simple Question - Stack OverflowBest way to suppress C warning "Unused variable x"? [duplicate]How can I suppress "unused parameter" warnings in C?More results from stackoverflow.com
Sep 28, 2009You can put it in " (void)var; " expression (does nothing) so that a compiler sees it is used. This is portable between compilers. E.g.How do you disable the unused variable warnings coming out of gcc Unused Variable Error in C .. Simple Question - Stack OverflowBest way to suppress C warning "Unused variable x"? [duplicate]How can I suppress "unused parameter" warnings in C?More results from stackoverflow.com
In a situation where a contract only cares about one of the returned variables, it is still necessary to declare and set the other variables. Because these variables are declared but not used, the compiler raises an Unused local variable warning.