Skip to content

Commit

Permalink
Clang: enable -Wtautological-constant-out-of-range-compare
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hans@chromium.org committed Nov 2, 2012
1 parent 82d7abd commit 21c35d7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down Expand Up @@ -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', {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/chromeos/web_socket_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(opcode) < 16);
header[0] = opcode | 0x80; // FIN bit set.
if (size < 126) {
header[1] = size;
Expand Down

0 comments on commit 21c35d7

Please sign in to comment.