Fix Clang warning about tautological compare.
authorulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Sep 2012 14:42:08 +0000 (14:42 +0000)
committerulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Sep 2012 14:42:08 +0000 (14:42 +0000)
BUG=151927

R=hans@chromium.org

Patch from Hans Wennborg <hans@chromium.org>.

Review URL: https://chromiumcodereview.appspot.com/10985043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/utils.h

index dc3a171..e659de2 100644 (file)
@@ -974,7 +974,7 @@ class EnumSet {
   T Mask(E element) const {
     // The strange typing in ASSERT is necessary to avoid stupid warnings, see:
     // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680
-    ASSERT(element < static_cast<int>(sizeof(T) * CHAR_BIT));
+    ASSERT(static_cast<int>(element) < static_cast<int>(sizeof(T) * CHAR_BIT));
     return 1 << element;
   }