Commit 7cfb50cd by Nicolas Capens Committed by Nicolas Capens

Fix implicit fallthrough warnings treated as errors

Ideally we'd use the [[fallthrough]] attribute to silence this, but that isn't supported until C++17 and we're sticking with C++11 for now. Bug b/120382288 Change-Id: I98f28e42505ed496b0b35c29a7dc03fca18cf4ff Reviewed-on: https://swiftshader-review.googlesource.com/c/23128Reviewed-by: 's avatarGreg Hartman <ghartman@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 2661e840
......@@ -32,6 +32,7 @@ cc_defaults {
"-DNO_SANITIZE_FUNCTION=",
// FIXME: Use <android/api-level.h> instead?
"-DANDROID_PLATFORM_SDK_VERSION=10000",
"-Wno-implicit-fallthrough",
"-Wno-unused-parameter",
"-Wno-unused-local-typedef",
],
......
......@@ -128,6 +128,7 @@ COMMON_CFLAGS := \
-Wno-unused-value \
-Wno-unused-variable \
-Wno-implicit-exception-spec-mismatch \
-Wno-implicit-fallthrough \
-Wno-overloaded-virtual \
-Wno-non-virtual-dtor \
-Wno-attributes \
......
......@@ -29,6 +29,7 @@ COMMON_CFLAGS := \
-Wno-unused-parameter \
-Wno-unused-variable \
-Wno-implicit-exception-spec-mismatch \
-Wno-implicit-fallthrough \
-Wno-overloaded-virtual \
-Wno-attributes \
-Wno-unknown-attributes \
......
......@@ -13,6 +13,7 @@ COMMON_CFLAGS := \
-Wno-unused-function \
-Wno-unused-parameter \
-Wno-implicit-exception-spec-mismatch \
-Wno-implicit-fallthrough \
-Wno-overloaded-virtual \
-Wno-attributes \
-Wno-unknown-attributes \
......
......@@ -20,6 +20,7 @@ COMMON_CFLAGS := \
-Wno-unused-parameter \
-Wno-unused-variable \
-Wno-implicit-exception-spec-mismatch \
-Wno-implicit-fallthrough \
-Wno-overloaded-virtual \
-Wno-attributes \
-Wno-unknown-attributes \
......
......@@ -20,6 +20,7 @@ COMMON_CFLAGS := \
-Wno-unused-private-field \
-Wno-unused-variable \
-Wno-implicit-exception-spec-mismatch \
-Wno-implicit-fallthrough \
-Wno-overloaded-virtual \
-Wno-attributes \
-Wno-unknown-attributes \
......
......@@ -5624,6 +5624,8 @@ void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normal
case GL_FLOAT:
case GL_HALF_FLOAT_OES: // GL_OES_vertex_half_float
case GL_HALF_FLOAT:
case GL_INT:
case GL_UNSIGNED_INT:
break;
case GL_INT_2_10_10_10_REV:
case GL_UNSIGNED_INT_2_10_10_10_REV:
......@@ -5631,8 +5633,6 @@ void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normal
{
return error(GL_INVALID_OPERATION);
}
case GL_INT:
case GL_UNSIGNED_INT:
break;
default:
return error(GL_INVALID_ENUM);
......
......@@ -116,6 +116,7 @@ LOCAL_CFLAGS += \
-Wno-unused-lambda-capture \
-Wno-unused-parameter \
-Wno-implicit-exception-spec-mismatch \
-Wno-implicit-fallthrough \
-Wno-overloaded-virtual \
-Wno-non-virtual-dtor \
-Wno-unknown-warning-option \
......
......@@ -59,6 +59,7 @@ cc_library_static {
"-D__STDC_CONSTANT_MACROS",
"-D__STDC_FORMAT_MACROS",
"-DLOG_TAG=\"libLLVM_swiftshader\"",
"-Wno-implicit-fallthrough",
"-Wno-unused-result",
"-Wno-unused-function",
"-Wno-unused-variable",
......
......@@ -401,6 +401,7 @@ LOCAL_CFLAGS += \
-Wall \
-Werror \
-Wno-implicit-exception-spec-mismatch \
-Wno-implicit-fallthrough \
-Wno-overloaded-virtual \
-Wno-undefined-var-template \
-Wno-unneeded-internal-declaration \
......
......@@ -28,6 +28,7 @@ cc_library_static {
"-D__STDC_CONSTANT_MACROS",
"-D__STDC_FORMAT_MACROS",
"-DLOG_TAG=\"libsubzero\"",
"-Wno-implicit-fallthrough",
"-Wno-unused-parameter",
],
......
......@@ -28,6 +28,7 @@ cc_library_static {
"-D__STDC_CONSTANT_MACROS",
"-D__STDC_FORMAT_MACROS",
"-DLOG_TAG=\"libsubzero\"",
"-Wno-implicit-fallthrough",
"-Wno-unused-parameter",
"-Wno-undefined-var-template",
"-Wno-unused-lambda-capture",
......
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