From 5b33211c5edafde82af781beaa1dbc295000a62f Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Wed, 30 Jan 2013 20:33:12 +0000 Subject: Start addressing the clang static analyzer issues https://codereview.appspot.com/7249043/ git-svn-id: http://skia.googlecode.com/svn/trunk@7469 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkRRect.cpp | 4 +--- src/core/SkRegion.cpp | 2 -- src/core/SkScan_Hairline.cpp | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) (limited to 'src/core') 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 { -- cgit v1.2.3