Flag unused parameters with a WEAK_WARNING instead of ERROR (fixes #491)