Addressed xcode analysis complaints
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 24 Sep 2012 14:20:00 +0000 (14:20 +0000)
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 24 Sep 2012 14:20:00 +0000 (14:20 +0000)
http://codereview.appspot.com/6558048/

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

src/core/SkBitmap.cpp
src/gpu/GrTextureAccess.cpp
src/gpu/SkGpuDevice.cpp
src/gpu/gl/GrGLSL.cpp
src/gpu/gl/GrGpuGL.cpp
src/views/mac/SkNSView.mm

index 9dbf322..59871f7 100644 (file)
@@ -1162,7 +1162,7 @@ void SkBitmap::buildMipMap(bool forceRebuild) {
     uint8_t*    addr = (uint8_t*)mm->pixels();
     int         width = this->width();
     int         height = this->height();
-    unsigned    rowBytes = this->rowBytes();
+    unsigned    rowBytes;
     SkBitmap    dstBM;
 
     for (int i = 0; i < maxLevels; i++) {
index 1156ec2..5c3a36d 100644 (file)
@@ -84,7 +84,6 @@ void GrTextureAccess::reset(GrTexture* texture,
 void GrTextureAccess::setSwizzle(const char* swizzle) {
     fSwizzleMask = 0;
     memset(fSwizzle, '\0', 5);
-    int i = 0;
     for (int i = 0; i < 4 && '\0' != swizzle[i]; ++i) {
         fSwizzle[i] = swizzle[i];
         switch (swizzle[i]) {
index e7fd8c4..2149d11 100644 (file)
@@ -1662,8 +1662,6 @@ bool SkGpuDevice::filterImage(SkImageFilter* filter, const SkBitmap& src,
     GrPaint paint;
     paint.reset();
 
-    GrSamplerState* sampler = paint.textureSampler(kBitmapTextureIdx);
-
     GrTexture* texture;
     // We assume here that the filter will not attempt to tile the src. Otherwise, this cache lookup
     // must be pushed upstack.
index 079c082..420af03 100644 (file)
@@ -91,7 +91,7 @@ const char* GrGLSLVectorNonhomogCoords(int count) {
     return NONHOMOGS[count];
 }
 
-const char* GrGLSLVectorNonhomogCoord(GrSLType type) {
+const char* GrGLSLVectorNonhomogCoords(GrSLType type) {
     return GrGLSLVectorNonhomogCoords(GrSLTypeToVecLength(type));
 }
 
index d9988c4..157d9bc 100644 (file)
@@ -1073,8 +1073,6 @@ bool GrGpuGL::createStencilBufferForRenderTarget(GrRenderTarget* rt,
         return false;
     }
 
-    GrGLStencilBuffer* sb = NULL;
-
     int stencilFmtCnt = this->glCaps().stencilFormats().count();
     for (int i = 0; i < stencilFmtCnt; ++i) {
         GL_CALL(BindRenderbuffer(GR_GL_RENDERBUFFER, sbID));
@@ -2032,7 +2030,6 @@ void GrGpuGL::flushBoundTextureAndParams(int stage) {
 void GrGpuGL::flushBoundTextureAndParams(int stage,
                                          const GrTextureParams& params,
                                          GrGLTexture* nextTexture) {
-    GrDrawState* drawState = this->drawState();
 
     // true for now, but maybe not with GrEffect.
     GrAssert(NULL != nextTexture);
index 580651c..b3c6762 100644 (file)
@@ -6,7 +6,7 @@
  * found in the LICENSE file.
  */
 
-#import "SkNSView.h"s
+#import "SkNSView.h"
 #include "SkCanvas.h"
 #include "SkCGUtils.h"
 #include "SkEvent.h"