Bug 105679 - [Blackberry] Static code analysis warning fixes
Summary: [Blackberry] Static code analysis warning fixes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-22 13:03 PST by sfa
Modified: 2013-01-04 09:17 PST (History)
5 users (show)

See Also:


Attachments
patch for klocwork issues: 959, 1855 (5.81 KB, patch)
2012-12-22 13:36 PST, sfa
no flags Details | Formatted Diff | Diff
updated patch (5.79 KB, patch)
2013-01-03 08:02 PST, sfa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sfa 2012-12-22 13:03:34 PST
Klocwork issues: 959,1855, 4084
Comment 1 sfa 2012-12-22 13:36:08 PST
Created attachment 180607 [details]
patch for klocwork issues: 959, 1855
Comment 2 sfa 2012-12-22 13:37:11 PST
klocwork issue 4084 withdrawn.
Comment 3 sfa 2013-01-02 07:32:44 PST
patch has passed EWS, needs review still.
Comment 4 Rob Buis 2013-01-02 09:02:23 PST
Comment on attachment 180607 [details]
patch for klocwork issues: 959, 1855

View in context: https://bugs.webkit.org/attachment.cgi?id=180607&action=review

Looks good, please fix the style nit before landing.

> Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp:171
> +        if (page) {

It is Webkit style to combine above two lines.
Comment 5 Rob Buis 2013-01-02 09:03:09 PST
Comment on attachment 180607 [details]
patch for klocwork issues: 959, 1855

View in context: https://bugs.webkit.org/attachment.cgi?id=180607&action=review

Looks good, please fix the style nit before landing.

> Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp:171
> +        if (page) {

It is Webkit style to combine above two lines.
Comment 6 sfa 2013-01-02 10:00:02 PST
There are two accesses to the var 'page' in the if-stmt so combining the lines wouldn't have the same semantics.

The other access is the line further down:

float scaleFactorFudge = 1 / page->deviceScaleFactor();
Comment 7 Rob Buis 2013-01-03 02:26:21 PST
(In reply to comment #6)
> There are two accesses to the var 'page' in the if-stmt so combining the lines wouldn't have the same semantics.
> 
> The other access is the line further down:
> 
> float scaleFactorFudge = 1 / page->deviceScaleFactor();

I don't think that matters, page is visible in the entire scope of the if block. Can you recheck?
Comment 8 sfa 2013-01-03 08:02:08 PST
Created attachment 181177 [details]
updated patch

Sorry, I misunderstood which lines you wanted merged together, this patch moves the initialization of the variable into the if-expr.
Comment 9 Rob Buis 2013-01-03 23:03:46 PST
Comment on attachment 181177 [details]
updated patch

LGTM
Comment 10 WebKit Review Bot 2013-01-03 23:04:24 PST
Comment on attachment 181177 [details]
updated patch

Rejecting attachment 181177 [details] from review queue.

ascian@rim.com does not have reviewer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.

- If you do not have reviewer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.

- If you have reviewer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your reviewer rights.
Comment 11 Eric Seidel (no email) 2013-01-04 00:40:48 PST
Comment on attachment 180607 [details]
patch for klocwork issues: 959, 1855

Cleared Rob Buis's review+ from obsolete attachment 180607 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Comment 12 WebKit Review Bot 2013-01-04 09:17:26 PST
Comment on attachment 181177 [details]
updated patch

Clearing flags on attachment: 181177

Committed r138804: <http://trac.webkit.org/changeset/138804>
Comment 13 WebKit Review Bot 2013-01-04 09:17:30 PST
All reviewed patches have been landed.  Closing bug.