Fix a number of warnings

Those two commits fix a number of unused argument warnings and shadow warnings.
Some files might require re-preprocessing to propagate those changes.