Fixed -1 to implicitly unsigned char narrowing error.
C++11 does not allow narrowing a constant expression value to a type
that can't fully represent it. So when char is considered unsigned,
we can't store -1 in it. Explicitly using signed char fixes it.
Change-Id: I5c0e9fe0025659e06291655a12220ab589d5f5bd
Reviewed-on: https://swiftshader-review.googlesource.com/9630
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
(cherry picked from commit 0f20653759521be0e9a87579104ce04834495305)
Reviewed-on: https://swiftshader-review.googlesource.com/11593
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Shader/Shader.cpp b/src/Shader/Shader.cpp
index a6c5fda..c861069 100644
--- a/src/Shader/Shader.cpp
+++ b/src/Shader/Shader.cpp
@@ -1173,7 +1173,7 @@
ASSERT(false);
}
- static const char size[] =
+ static const signed char size[] =
{
0, // NOP = 0
2, // MOV