Fix some compiler warnings in tests