Part 1 of 2: <http://webkit.org/b/56337> Enable -Werror on ANGLE
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 May 2011 18:00:44 +0000 (18:00 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 May 2011 18:00:44 +0000 (18:00 +0000)
Merge ANGLE upstream commits r572, r573, r574, r575.

This unblocks enabling -Werror on ANGLE.  Since all changes are
in the upstream repository, they may be safely overwritten
during the next ANGLE update.

* src/compiler/ConstantUnion.h:
(ConstantUnion::operator==): Added a default case.
* src/compiler/Intermediate.cpp:
(TIntermBinary::promote): Added parentheses.
* src/compiler/ParseHelper.cpp:
(TParseContext::precisionErrorCheck): Added a default case.
* src/compiler/PoolAlloc.cpp:
(TAllocation::checkGuardBlock): Changed '%u' to '%lu' for size_t
variable.  Put for loop inside #ifdef GUARD_BLOCKS/#endif macros
to fix tautological-compare warning.
(TAllocation::checkAllocList): Added newline to end of file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85761 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/src/compiler/ConstantUnion.h
Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp
Source/ThirdParty/ANGLE/src/compiler/ParseHelper.cpp
Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp

index 766e81b..c3d59a3 100644 (file)
@@ -1,3 +1,25 @@
+2011-05-04  David Kilzer  <ddkilzer@apple.com>
+
+        Part 1 of 2: <http://webkit.org/b/56337> Enable -Werror on ANGLE
+
+        Merge ANGLE upstream commits r572, r573, r574, r575.
+
+        This unblocks enabling -Werror on ANGLE.  Since all changes are
+        in the upstream repository, they may be safely overwritten
+        during the next ANGLE update.
+
+        * src/compiler/ConstantUnion.h:
+        (ConstantUnion::operator==): Added a default case.
+        * src/compiler/Intermediate.cpp:
+        (TIntermBinary::promote): Added parentheses.
+        * src/compiler/ParseHelper.cpp:
+        (TParseContext::precisionErrorCheck): Added a default case.
+        * src/compiler/PoolAlloc.cpp:
+        (TAllocation::checkGuardBlock): Changed '%u' to '%lu' for size_t
+        variable.  Put for loop inside #ifdef GUARD_BLOCKS/#endif macros
+        to fix tautological-compare warning.
+        (TAllocation::checkAllocList): Added newline to end of file.
+
 2011-04-26  Dan Bernstein  <mitz@apple.com>
 
         Build fix.
index cf531ea..aa1b875 100644 (file)
@@ -69,6 +69,8 @@ public:
                 return true;
 
             break;
+        default:
+            return false;
         }
 
         return false;
index ea71234..e1e8da2 100644 (file)
@@ -1005,8 +1005,8 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
         case EOpAddAssign:
         case EOpSubAssign:
         case EOpDivAssign:
-            if (left->isMatrix() && right->isVector() ||
-                left->isVector() && right->isMatrix())
+            if ((left->isMatrix() && right->isVector()) ||
+                (left->isVector() && right->isMatrix()))
                 return false;
             setType(TType(basicType, higherPrecision, EvqTemporary, size, left->isMatrix() || right->isMatrix()));
             break;
@@ -1017,8 +1017,8 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
         case EOpGreaterThan:
         case EOpLessThanEqual:
         case EOpGreaterThanEqual:
-            if (left->isMatrix() && right->isVector() ||
-                left->isVector() && right->isMatrix())
+            if ((left->isMatrix() && right->isVector()) ||
+                (left->isVector() && right->isMatrix()))
                 return false;
             setType(TType(EbtBool, EbpUndefined));
             break;
index 53f3fa8..e149430 100644 (file)
@@ -274,6 +274,8 @@ bool TParseContext::precisionErrorCheck(int line, TPrecision precision, TBasicTy
             return true;
         }
         break;
+    default:
+        return false;
     }
     return false;
 }
index 93e21e4..e286c7d 100644 (file)
@@ -151,16 +151,18 @@ const unsigned char TAllocation::userDataFill       = 0xcd;
 //
 void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, const char* locText) const
 {
+#ifdef GUARD_BLOCKS
     for (size_t x = 0; x < guardBlockSize; x++) {
         if (blockMem[x] != val) {
             char assertMsg[80];
 
             // We don't print the assert message.  It's here just to be helpful.
-            sprintf(assertMsg, "PoolAlloc: Damage %s %u byte allocation at 0x%p\n",
+            sprintf(assertMsg, "PoolAlloc: Damage %s %lu byte allocation at 0x%p\n",
                     locText, size, data());
             assert(0 && "PoolAlloc: Damage in guard block");
         }
     }
+#endif
 }
 
 
@@ -299,4 +301,4 @@ void TAllocation::checkAllocList() const
 {
     for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc)
         alloc->check();
-}
\ No newline at end of file
+}