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

Issue 196823004: Silence warning after f5e315ccf1a. (Closed)

Created:
6 years, 9 months ago by f(malita)
Modified:
6 years, 9 months ago
Reviewers:
epoger
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Silence warning after f5e315ccf1a. (clang 3.3): ../tools/PictureRenderer.cpp:350:13: error: variable 'hash' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!generatedHash) { ^~~~~~~~~~~~~~ ../tools/PictureRenderer.cpp:354:53: note: uninitialized use occurs here jsonSummaryPtr->add(outputFilename.c_str(), hash); ^~~~ ../tools/PictureRenderer.cpp:350:9: note: remove the 'if' if its condition is always true if (!generatedHash) { ^~~~~~~~~~~~~~~~~~~~ ../tools/PictureRenderer.cpp:334:18: note: initialize the variable 'hash' to silence this warning uint64_t hash; ^ = 0 The warning is wrong, but the compiler does have a point: generatedHash is always false at that point. R=epoger@google.com Committed: http://code.google.com/p/skia/source/detail?r=13869

Patch Set 1 #

Patch Set 2 : Drop unrelated changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M tools/PictureRenderer.cpp View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
f(malita)
6 years, 9 months ago (2014-03-19 22:01:12 UTC) #1
epoger
LGTM Thanks!
6 years, 9 months ago (2014-03-19 22:08:58 UTC) #2
f(malita)
The CQ bit was checked by fmalita@chromium.org
6 years, 9 months ago (2014-03-19 22:33:51 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/fmalita@chromium.org/196823004/20001
6 years, 9 months ago (2014-03-19 22:33:57 UTC) #4
commit-bot: I haz the power
6 years, 9 months ago (2014-03-19 22:58:54 UTC) #5
Message was sent while issue was closed.
Change committed as 13869

Powered by Google App Engine
This is Rietveld 408576698