Warn about unused parameters and fix remaining warnings.