Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(69)

Issue 4627052: Coverity Fixlet - ARRAY_VS_SINGLETON

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 6 months ago by scr
Modified:
14 years, 6 months ago
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

Coverity Fixlet - ARRAY_VS_SINGLETON Address http://chromecoverity.mtv.corp.google.com:5467/cov.cgi?cid=38 Made this function more readable by passing in the points, and doing the wackiness of casting and walking each component of the point within the static mechod CID=38 BUG= TEST=

Patch Set 1 #

Patch Set 2 : Adjusted to taking the point pointer and walking each component of the point in exceeds_dist #

Patch Set 3 : deref when comparing. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -9 lines) Patch
M src/core/SkPath.cpp View 1 2 3 chunks +9 lines, -9 lines 6 comments Download

Messages

Total messages: 5
scr
14 years, 6 months ago (2011-06-22 00:45:04 UTC) #1
Steve VanDeBogart
http://codereview.appspot.com/4627052/diff/5001/src/core/SkPath.cpp File src/core/SkPath.cpp (left): http://codereview.appspot.com/4627052/diff/5001/src/core/SkPath.cpp#oldcode1212 src/core/SkPath.cpp:1212: if (--subLevel >= 0 && exceeds_dist(&pts[0].fX, &pts[1].fX, dist, 4)) ...
14 years, 6 months ago (2011-06-22 20:08:00 UTC) #2
reed1
1. Does this CL fix the covertly warning? 2. Have we verified that our automated ...
14 years, 6 months ago (2011-06-22 20:54:05 UTC) #3
scr
http://codereview.appspot.com/4627052/diff/5001/src/core/SkPath.cpp File src/core/SkPath.cpp (left): http://codereview.appspot.com/4627052/diff/5001/src/core/SkPath.cpp#oldcode1212 src/core/SkPath.cpp:1212: if (--subLevel >= 0 && exceeds_dist(&pts[0].fX, &pts[1].fX, dist, 4)) ...
14 years, 6 months ago (2011-06-22 21:08:06 UTC) #4
reed1
14 years, 6 months ago (2011-06-28 11:58:46 UTC) #5
The 4 means perform 4 measurements, which is correct for quads. The bug is that
I had count *= 2 before the loop. I have fixed that.

Then I grepped android and chrome, and found there are no callers for
subdivide(). As there are no callers inside Skia either, and no tests, I have
removed the function entirely.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b