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

Issue 414025: A build fix for gcc 4.4 (r32522).... (Closed)

Created:
11 years, 1 month ago by Hironori Bono
Modified:
9 years, 7 months ago
Reviewers:
ian fette, Evan Martin
CC:
chromium-reviews_googlegroups.com, ben+cc_chromium.org
Base URL:
svn://chrome-svn.corp.google.com/chrome/trunk/src/
Visibility:
Public.

Description

A build fix for gcc 4.4. When calling a non-static member function without calling contructors, gcc 4.4 returns a warning "'<anonymous>' is used uninitialized in this function." To fix this warning, this change added a 'static' keyword to CanonicalizeHost(). BUG=none TEST=build chromium of gcc 4.4.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M chrome/browser/cookies_tree_model.cc View 1 chunk +1 line, -1 line 1 comment Download

Messages

Total messages: 8 (0 generated)
Hironori Bono
11 years, 1 month ago (2009-11-20 03:24:26 UTC) #1
ian fette
LGTM It's good to make this static, as it does not depend on any state ...
11 years, 1 month ago (2009-11-20 15:08:06 UTC) #2
Evan Martin
LGTM http://codereview.chromium.org/414025/diff/1/2 File chrome/browser/cookies_tree_model.cc (right): http://codereview.chromium.org/414025/diff/1/2#newcode61 Line 61: bool operator() (const CookieTreeNode* lhs, May as ...
11 years, 1 month ago (2009-11-20 18:52:31 UTC) #3
Hironori Bono
Sorry for my slow response. Is it possible to land this change on my behalf? ...
11 years, 1 month ago (2009-11-23 10:03:46 UTC) #4
ian fette
Evan - Making operator () static breaks the build. c:\b\slave\win\build\src\chrome\browser\cookies_tree_model.cc(62) : error C2801: '`anonymous-namespace'::OriginNodeComparator::operator ()' ...
11 years, 1 month ago (2009-11-23 17:20:36 UTC) #5
ian fette
I chatted with Evan, I am going to land this without making bool operator () ...
11 years, 1 month ago (2009-11-23 18:56:58 UTC) #6
ian fette
Landed as r32829. On 2009/11/23 18:56:58, ian fette wrote: > I chatted with Evan, I ...
11 years, 1 month ago (2009-11-23 19:43:03 UTC) #7
Hironori Bono
11 years, 1 month ago (2009-11-24 08:25:02 UTC) #8
Thank you for your comments and sorry for my slow response.

On 2009/11/20 15:08:06, ian fette wrote:
> Anyhow, I'm fine with this change, but would be curious to understand why this
is an error.

Even though I have not deeply investigate this issue, it seemed gcc 4.4 got
confused while compiling your CanonicalizeHost() and mis-understood the function
depended on some state in the class. (As you know, adding static explicitly
declares this function does not depend on any state of the class and prevent gcc
from getting confused.)

I would like to note that I'm not an expert of gcc and this comment may be
wrong.

Regards,

Hironori Bono

Powered by Google App Engine
This is Rietveld 408576698