Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Issue 14246019: Fix a warning in 64bit c++11 mode. (Closed)

Created:
7 years, 8 months ago by Nico
Modified:
7 years, 8 months ago
Reviewers:
piman
CC:
chromium-reviews, darin-cc_chromium.org, Cris Neckar
Visibility:
Public.

Description

Fix a warning in 64bit c++11 mode. The (harmless) warning was: ../../webkit/plugins/ppapi/message_channel.cc:286:69: error: comparison of constant 2305843009213693951 with expression of type 'unsigned int' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (std::numeric_limits<size_t>::max() / sizeof(NPIdentifier) <= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 1 error generated. It's always false in 64bit mode, but it's arguably useful in 32bit mode. BUG=233330 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=195026

Patch Set 1 #

Total comments: 2

Patch Set 2 : p(arano)iman #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M webkit/plugins/ppapi/message_channel.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Nico
cc cdn, who added this condition.
7 years, 8 months ago (2013-04-18 23:06:21 UTC) #1
piman
https://codereview.chromium.org/14246019/diff/1/webkit/plugins/ppapi/message_channel.cc File webkit/plugins/ppapi/message_channel.cc (right): https://codereview.chromium.org/14246019/diff/1/webkit/plugins/ppapi/message_channel.cc#newcode287 webkit/plugins/ppapi/message_channel.cc:287: static_cast<size_t>(*count + 1)) // Else, "always false" x64 warning. ...
7 years, 8 months ago (2013-04-18 23:11:36 UTC) #2
Nico
https://codereview.chromium.org/14246019/diff/1/webkit/plugins/ppapi/message_channel.cc File webkit/plugins/ppapi/message_channel.cc (right): https://codereview.chromium.org/14246019/diff/1/webkit/plugins/ppapi/message_channel.cc#newcode287 webkit/plugins/ppapi/message_channel.cc:287: static_cast<size_t>(*count + 1)) // Else, "always false" x64 warning. ...
7 years, 8 months ago (2013-04-18 23:13:52 UTC) #3
piman
lgtm
7 years, 8 months ago (2013-04-18 23:51:59 UTC) #4
Nico
7 years, 8 months ago (2013-04-19 00:13:54 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 manually as r195026.

Powered by Google App Engine
This is Rietveld 408576698