Fix warnings.

One instance of a unnecessary switch statement.
One instance of an unreferenced parameter.