Fixes parameter warnings in a way that works across all supported compilers

Retains full functionally and warnings if unused variables are used in the future.

This patch provides no functional changes, just warning fixes