Fix warnings "‘<function name>’ defined but not used".

__unused for function that are not referenced
__maybe_unused for functions that are referenced in excluded code
Fix warnings "label ‘<name>’ defined but not used".
Fix warnings "unused variable ‘<name>’".

UNUSED() for variables that are not used
__maybe_used for variables that are used in excluded code
Fix warnings "variable ‘<name>’ set but not used".

delete unneeded variables that don't help understand the surrounding code
__maybe_unused for the other variables
Adjust Makefiles:
- clean nvram_export.o
- add missing $(BIN_EXT)
- add target 'both' to facilitate test compilations