Commit 509a1d46 by Jamie Madill Committed by Commit Bot

GN: Enable more MSVS warnings.

Some warnings were enabled only in standalone builds. Enabling them in the GN config will prevent standalone build breakage and also make some potentially harmful warnings more visible to non-Windows devs. BUG=angleproject:1449 Change-Id: I11fe9bac957864d37af37b3860a22fcbd91946ac Reviewed-on: https://chromium-review.googlesource.com/360961Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent e1c4d39a
......@@ -48,6 +48,16 @@ config("internal_config") {
]
}
config("extra_warnings") {
# Enable more default warnings on Windows.
if (is_win) {
cflags = [
"/we4244", # Conversion: possible loss of data.
"/we4456", # Variable shadowing.
]
}
}
if (is_win) {
copy("copy_compiler_dll") {
sources = [
......@@ -129,6 +139,7 @@ static_library("angle_common") {
configs += [
":angle_common_config",
":debug_annotations_config",
":extra_warnings",
":internal_config",
]
......@@ -391,6 +402,7 @@ static_library("libANGLE") {
configs += [
":commit_id_config",
":debug_annotations_config",
":extra_warnings",
":libANGLE_config",
":internal_config",
]
......@@ -462,9 +474,10 @@ shared_library("libEGL") {
configs -= angle_undefine_configs
configs += [
":internal_config",
":commit_id_config",
":debug_annotations_config",
":extra_warnings",
":internal_config",
":libANGLE_config",
]
......@@ -531,7 +544,10 @@ static_library("angle_util") {
"EGL_EGLEXT_PROTOTYPES",
]
configs += [ ":debug_annotations_config" ]
configs += [
":debug_annotations_config",
":extra_warnings",
]
public_configs = [
":angle_util_config",
......
......@@ -465,7 +465,7 @@ struct Caps
GLuint maxImageUnits;
GLuint maxCombinedImageUniforms;
GLuint maxShaderStorageBufferBindings;
GLuint maxShaderStorageBlockSize;
GLuint64 maxShaderStorageBlockSize;
GLuint maxCombinedShaderStorageBlocks;
GLuint shaderStorageBufferOffsetAlignment;
......
......@@ -78,8 +78,8 @@ class UnpackRowLengthTest : public ANGLETest
for (int y = 0; y < texSize; y++)
{
std::vector<GLubyte>::iterator rowIter = buf.begin() + y * rowLength * 4;
std::fill(rowIter, rowIter + texSize * 4, 255);
std::fill(rowIter + texSize * 4, rowIter + rowLength * 4, 0);
std::fill(rowIter, rowIter + texSize * 4, static_cast<GLubyte>(255u));
std::fill(rowIter + texSize * 4, rowIter + rowLength * 4, static_cast<GLubyte>(0u));
}
GLuint tex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment