Fix some warnings when building tests.