aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-30 20:33:12 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-30 20:33:12 +0000
commit5b33211c5edafde82af781beaa1dbc295000a62f (patch)
tree31e7c9b17a8a393b4df309ea68256bc732d02620 /src/core
parent70476652a07710c15763a1c4021443a1d56c0974 (diff)
Start addressing the clang static analyzer issues
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkRRect.cpp4
-rw-r--r--src/core/SkRegion.cpp2
-rw-r--r--src/core/SkScan_Hairline.cpp2
3 files changed, 1 insertions, 7 deletions
diff --git a/src/core/SkRRect.cpp b/src/core/SkRRect.cpp
index a1c4e32618..fc1a1cf057 100644
--- a/src/core/SkRRect.cpp
+++ b/src/core/SkRRect.cpp
@@ -36,9 +36,7 @@ void SkRRect::setRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad) {
fType = kSimple_Type;
if (xRad >= SkScalarHalf(fRect.width()) && yRad >= SkScalarHalf(fRect.height())) {
fType = kOval_Type;
- // TODO: try asserting they are already W/2 & H/2 already
- xRad = SkScalarHalf(fRect.width());
- yRad = SkScalarHalf(fRect.height());
+ // TODO: assert that all the x&y radii are already W/2 & H/2
}
SkDEBUGCODE(this->validate();)
diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp
index e6ed68f456..dcad9eaab6 100644
--- a/src/core/SkRegion.cpp
+++ b/src/core/SkRegion.cpp
@@ -848,7 +848,6 @@ static int operate(const SkRegion::RunType a_runs[],
RgnOper oper(SkMin32(a_top, b_top), dst, op);
- bool firstInterval = true;
int prevBot = SkRegion::kRunTypeSentinel; // so we fail the first test
while (a_bot < SkRegion::kRunTypeSentinel ||
@@ -895,7 +894,6 @@ static int operate(const SkRegion::RunType a_runs[],
oper.addSpan(top, gSentinel, gSentinel);
}
oper.addSpan(bot, run0, run1);
- firstInterval = false;
if (quickExit && !oper.isEmpty()) {
return QUICK_EXIT_TRUE_COUNT;
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp
index 9e567b6d25..ada0078e3c 100644
--- a/src/core/SkScan_Hairline.cpp
+++ b/src/core/SkScan_Hairline.cpp
@@ -278,7 +278,6 @@ static void hair_path(const SkPath& path, const SkRasterClip& rclip, SkBlitter*
}
SkAAClipBlitterWrapper wrap;
- const SkIRect* clipR = NULL;
const SkRegion* clip = NULL;
{
@@ -290,7 +289,6 @@ static void hair_path(const SkPath& path, const SkRasterClip& rclip, SkBlitter*
return;
}
if (!rclip.quickContains(ibounds)) {
- clipR = &rclip.getBounds();
if (rclip.isBW()) {
clip = &rclip.bwRgn();
} else {