Fix all Windows warnings

This commit is contained in:
Corentin Wallez
2017-07-10 21:44:06 -04:00
committed by Corentin Wallez
parent 8fca4a21b7
commit 83e779d8f2
22 changed files with 99 additions and 96 deletions

View File

@@ -160,9 +160,11 @@ TEST(CommandAllocator, MultipleIterations) {
uint32_t myFirst = 42;
uint32_t myCount = 16;
CommandDraw* draw = allocator.Allocate<CommandDraw>(CommandType::Draw);
draw->first = myFirst;
draw->count = myCount;
{
CommandDraw* draw = allocator.Allocate<CommandDraw>(CommandType::Draw);
draw->first = myFirst;
draw->count = myCount;
}
{
CommandIterator iterator(std::move(allocator));
@@ -235,7 +237,7 @@ TEST(CommandAllocator, ManySmallCommands) {
// Stay under max representable uint16_t
const int kCommandCount = 50000;
int count = 0;
uint16_t count = 0;
for (int i = 0; i < kCommandCount; i++) {
CommandSmall* small = allocator.Allocate<CommandSmall>(CommandType::Small);
small->data = count ++;

View File

@@ -63,7 +63,7 @@ TEST(Math, Align) {
char* aligned = Align(unaligned, kTestAlignment);
ASSERT_GE(aligned - unaligned, 0);
ASSERT_LT(aligned - unaligned, kTestAlignment);
ASSERT_LT(static_cast<size_t>(aligned - unaligned), kTestAlignment);
ASSERT_EQ(reinterpret_cast<intptr_t>(aligned) & (kTestAlignment -1), 0);
}
}

View File

@@ -51,7 +51,7 @@ void ValidationTest::TearDown() {
ASSERT_TRUE(expectation.gotStatus) << "Didn't get a status for " << name;
ASSERT_NE(NXT_BUILDER_ERROR_STATUS_UNKNOWN, expectation.gotStatus) << "Got unknown status for " << name;
ASSERT_NE(NXT_BUILDER_ERROR_STATUS_UNKNOWN, expectation.status) << "Got unknown status for " << name;
bool wasSuccess = expectation.status == NXT_BUILDER_ERROR_STATUS_SUCCESS;
ASSERT_EQ(expectation.expectSuccess, wasSuccess)