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

Issue 6293011: Initialized pair_id variable to 0.... (Closed)

Created:
9 years, 11 months ago by asharif1
Modified:
9 years, 6 months ago
CC:
chromium-reviews, bjanakiraman1
Visibility:
Public.

Description

Initialized pair_id variable to 0. This variable was uninitialized and the compiler gave a warning (which got converted into an error because we compile using -Werror) when GetIDAndCountOfFormElement() and its children are inlined. This is because there is a path in that function that returns true but leaves the pair_id variable uninitialized (if s.Step() is 0). Note that I am not a Chromium committer so you will have to commit this. BUG=70144 TEST=Submitting to trybots now.

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M chrome/browser/webdata/web_database.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/webdata/web_database.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
asharif1
Please review this.
9 years, 11 months ago (2011-01-19 19:23:07 UTC) #1
Avi (use Gerrit)
NAK, this feels wrong. If GetIDAndCountOfFormElement() can return true yet not actually return a valid ...
9 years, 11 months ago (2011-01-19 19:42:02 UTC) #2
dhollowa
According to the .h: Sets *count to 0 if there is no such row in ...
9 years, 11 months ago (2011-01-19 21:08:03 UTC) #3
dhollowa
Also, I'm curious. Which compiler is complaining? On 2011/01/19 21:08:03, dhollowa wrote: > According to ...
9 years, 11 months ago (2011-01-19 21:09:57 UTC) #4
asharif1
This is Crosstool (Google compiler) which does more aggressive inlining than vanilla gcc. This "bug" ...
9 years, 11 months ago (2011-01-19 21:33:40 UTC) #5
dhollowa
Yes, I would simply add: *pair_id = 0; just before |*count = 0;| on line ...
9 years, 11 months ago (2011-01-19 21:47:08 UTC) #6
asharif1
On 2011/01/19 21:47:08, dhollowa wrote: > Yes, I would simply add: > > *pair_id = ...
9 years, 11 months ago (2011-01-19 22:11:29 UTC) #7
Avi (use Gerrit)
Much better. LGTM.
9 years, 11 months ago (2011-01-19 22:14:17 UTC) #8
Avi (use Gerrit)
9 years, 11 months ago (2011-01-19 22:34:58 UTC) #9
Committed as r71860.

Powered by Google App Engine
This is Rietveld 408576698