Fix C4434 warnings about 32-bit shift assigned to 64-bits
VS 2015 has a new or louder warning about 32-bit shifts that are then
assigned to a 64-bit target. This code triggers it:
int64_t size = 1 << shift_amount;
Because the '1' being shifted is a 32-bit int the result of the shift
will be a 32-bit result, so assigning it to a 64-bit variable is just
misleading.
In other cases the destination is a size_t which means that the warning
only shows up on 64-bit builds. However in this case the size_t was
later cast to a 32-bit type, so the warnings can be suppressed by
selecting more natural types and *deleting* some casts. The two warnings
were:
C4334: '<<': result of 32-bit shift implicitly converted to 64 bits
third_party\angle\src\tests\gl_tests\framebufferrendermipmaptest.cpp(90)
third_party\angle\src\tests\gl_tests\framebufferrendermipmaptest.cpp(156)
BUG=593448
Change-Id: Ice9f67096b155fbb5fa3247ad04ac41acffa36a5
Reviewed-on: https://chromium-review.googlesource.com/336332Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Showing
Please
register
or
sign in
to comment