Silence warning after f5e315ccf1a.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 19 Mar 2014 22:58:52 +0000 (22:58 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 19 Mar 2014 22:58:52 +0000 (22:58 +0000)
commitb470c2140c02a4c8df2fed02c325b5a6a77027be
tree965186c9433c4df4ea1ad64f0e368104fb84148e
parent1c30818f66454f46b978d6c806f658850ef4157c
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

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/196823004

git-svn-id: http://skia.googlecode.com/svn/trunk@13869 2bbb7eff-a529-9590-31e7-b0007b416f81
tools/PictureRenderer.cpp