Fix warnings.

One instance of a unnecessary switch statement.
One instance of an unreferenced parameter.
Merge pull request #160 from ahmedcharles/warnings

Fix warnings.