From 21c35d7280ba62564ad4c2087438501f01ee3420 Mon Sep 17 00:00:00 2001 From: "hans@chromium.org" Date: Fri, 2 Nov 2012 23:09:07 +0000 Subject: [PATCH] Clang: enable -Wtautological-constant-out-of-range-compare This warning was implemented in Clang a couple of weeks ago, and now our code base is clean enough to enable it. BUG=151927 Review URL: https://chromiumcodereview.appspot.com/11366060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165793 0039d316-1c4b-4281-b951-d872f2087c98 --- build/common.gypi | 13 ------------- chrome/browser/chromeos/web_socket_proxy.cc | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/build/common.gypi b/build/common.gypi index 569772f121f601..e45863d339a65b 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -2525,22 +2525,12 @@ # Warns on switches on enums that cover all enum values but # also contain a default: branch. Chrome is full of that. '-Wno-covered-switch-default', - - # TODO(thakis): Remove this once http://crbug.com/151927 is fixed. - '-Wno-tautological-constant-out-of-range-compare', ], 'cflags!': [ # Clang doesn't seem to know know this flag. '-mfpmath=sse', ], }], - ['OS=="android"', { - 'cflags!': [ - # Clang ARM does not support the following option. - # TODO: Add this flag back http://crbug.com/157195. - '-Wno-tautological-constant-out-of-range-compare', - ] - }], ['clang==1 and clang_use_chrome_plugins==1', { 'cflags': [ '<@(clang_chrome_plugins_flags)', @@ -3060,9 +3050,6 @@ # Warns on switches on enums that cover all enum values but # also contain a default: branch. Chrome is full of that. '-Wno-covered-switch-default', - - # TODO(thakis): Remove this once http://crbug.com/151927 is fixed. - '-Wno-tautological-constant-out-of-range-compare', ], }], ['clang==1 and clang_use_chrome_plugins==1', { diff --git a/chrome/browser/chromeos/web_socket_proxy.cc b/chrome/browser/chromeos/web_socket_proxy.cc index 0eecd1d885893e..425f25f8b963d5 100644 --- a/chrome/browser/chromeos/web_socket_proxy.cc +++ b/chrome/browser/chromeos/web_socket_proxy.cc @@ -1310,7 +1310,7 @@ bool Conn::EmitFrame( uint8 header[10]; int header_size = 2; DCHECK(chan); - DCHECK(opcode >= 0 && opcode < 16); + DCHECK(opcode >= 0 && static_cast(opcode) < 16); header[0] = opcode | 0x80; // FIN bit set. if (size < 126) { header[1] = size;