diff options
author | tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-26 21:48:58 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-26 21:48:58 +0000 |
commit | 48552314f6d101f3fd094d5f2fd6f70fe9aad841 (patch) | |
tree | 3f1900ce9e4801313b481d0a5420ef5d07ed92e0 | |
parent | 4f65a2750007725349774e53067df3307376257c (diff) |
Fix a few clang errors while trying to build tools target.
Most of the errors were like:
../../src/gpu/gl/GrGLEffectMatrix.cpp:74:9: error: variable 'varyingType' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
../../src/gpu/gl/debug/GrDebugGL.h:125:21: error: private field 'fMaxTextureUnits' is not used [-Werror,-Wunused-private-field]
../../src/core/SkBitmapSampler.cpp:312:25: error: private field 'fProcTable' is not used [-Werror,-Wunused-private-field]
R=bsalomon@google.com,scroggo@google.com
Review URL: https://codereview.chromium.org/12915007
git-svn-id: http://skia.googlecode.com/svn/trunk@8403 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/core/SkUtils.h | 16 | ||||
-rw-r--r-- | src/core/SkBitmapSampler.cpp | 2 | ||||
-rw-r--r-- | src/core/SkRasterClip.h | 1 | ||||
-rw-r--r-- | src/core/SkTextToPathIter.h | 1 | ||||
-rw-r--r-- | src/core/SkUtils.cpp | 33 | ||||
-rw-r--r-- | src/effects/SkDisplacementMapEffect.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLEffectMatrix.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrDebugGL.h | 1 | ||||
-rw-r--r-- | src/image/SkSurface_Picture.cpp | 1 |
9 files changed, 1 insertions, 58 deletions
diff --git a/include/core/SkUtils.h b/include/core/SkUtils.h index 66655d44f3..e29367dc22 100644 --- a/include/core/SkUtils.h +++ b/include/core/SkUtils.h @@ -114,20 +114,4 @@ private: const char* fLabel; }; -/////////////////////////////////////////////////////////////////////////////// - -class SkAutoMemoryUsageProbe { -public: - /** Record memory usage in constructor, and dump the result - (delta and current total) in the destructor, with the optional - label. NOTE: label contents are not copied, just the ptr is - retained, so DON'T DELETE IT. - */ - SkAutoMemoryUsageProbe(const char label[]); - ~SkAutoMemoryUsageProbe(); -private: - const char* fLabel; - size_t fBytesAllocated; -}; - #endif diff --git a/src/core/SkBitmapSampler.cpp b/src/core/SkBitmapSampler.cpp index da8aa8a5ba..2b68510445 100644 --- a/src/core/SkBitmapSampler.cpp +++ b/src/core/SkBitmapSampler.cpp @@ -290,7 +290,6 @@ class A8_NoFilter_Sampler : public SkBitmapSampler { public: A8_NoFilter_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) : SkBitmapSampler(bm, false, tmx, tmy) - , fProcTable(NULL) { } @@ -309,7 +308,6 @@ public: } private: - const SkFilterProc* fProcTable; SkPMColor fColor; }; diff --git a/src/core/SkRasterClip.h b/src/core/SkRasterClip.h index 7e015aacec..a3078605f7 100644 --- a/src/core/SkRasterClip.h +++ b/src/core/SkRasterClip.h @@ -153,7 +153,6 @@ public: } private: - const SkAAClip* fAAClip; SkRegion fBWRgn; SkAAClipBlitter fAABlitter; // what we return diff --git a/src/core/SkTextToPathIter.h b/src/core/SkTextToPathIter.h index 73f27ed039..e98d6d9370 100644 --- a/src/core/SkTextToPathIter.h +++ b/src/core/SkTextToPathIter.h @@ -41,7 +41,6 @@ private: const char* fStop; SkMeasureCacheProc fGlyphCacheProc; - const SkPath* fPath; // returned in next SkScalar fXPos; // accumulated xpos, returned in next SkAutoKern fAutoKern; int fXYIndex; // cache for horizontal -vs- vertical text diff --git a/src/core/SkUtils.cpp b/src/core/SkUtils.cpp index 1af64c2aea..e460ac8f6e 100644 --- a/src/core/SkUtils.cpp +++ b/src/core/SkUtils.cpp @@ -395,36 +395,3 @@ size_t SkUTF16_ToUTF8(const uint16_t utf16[], int numberOf16BitValues, } return size; } - -/////////////////////////////////////////////////////////////////////////////// - -#include <stdlib.h> - -#if 0 -static int round_to_K(size_t bytes) { - return (bytes + 512) >> 10; -} -#endif - -SkAutoMemoryUsageProbe::SkAutoMemoryUsageProbe(const char label[]) - : fLabel(label) { -#if 0 - struct mallinfo mi = mallinfo(); - - fBytesAllocated = mi.uordblks; -#endif -} - -SkAutoMemoryUsageProbe::~SkAutoMemoryUsageProbe() { -#if 0 - struct mallinfo mi = mallinfo(); - - printf("SkAutoMemoryUsageProbe "); - if (fLabel) { - printf("<%s> ", fLabel); - } - printf("delta %dK, current total allocated %dK\n", - round_to_K(mi.uordblks - fBytesAllocated), - round_to_K(mi.uordblks)); -#endif -} diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp index 6139523e76..f81f32fb96 100644 --- a/src/effects/SkDisplacementMapEffect.cpp +++ b/src/effects/SkDisplacementMapEffect.cpp @@ -223,8 +223,6 @@ private: GrGLEffectMatrix fDisplacementEffectMatrix; GrGLEffectMatrix fColorEffectMatrix; GrGLUniformManager::UniformHandle fScaleUni; - GrGLUniformManager::UniformHandle fYSignColor; - GrGLUniformManager::UniformHandle fYSignDispl; typedef GrGLEffect INHERITED; }; diff --git a/src/gpu/gl/GrGLEffectMatrix.cpp b/src/gpu/gl/GrGLEffectMatrix.cpp index e2e8807726..7e7a9c940a 100644 --- a/src/gpu/gl/GrGLEffectMatrix.cpp +++ b/src/gpu/gl/GrGLEffectMatrix.cpp @@ -48,7 +48,7 @@ GrSLType GrGLEffectMatrix::emitCode(GrGLShaderBuilder* builder, const char** fsCoordName, const char** vsCoordName, const char* suffix) { - GrSLType varyingType; + GrSLType varyingType = kVoid_GrSLType; const char* uniName; key &= kKeyMask; switch (key & kMatrixTypeKeyMask) { diff --git a/src/gpu/gl/debug/GrDebugGL.h b/src/gpu/gl/debug/GrDebugGL.h index e1a28bb834..795e388fec 100644 --- a/src/gpu/gl/debug/GrDebugGL.h +++ b/src/gpu/gl/debug/GrDebugGL.h @@ -122,7 +122,6 @@ private: GrGLint fPackRowLength; GrGLint fUnPackRowLength; - GrGLuint fMaxTextureUnits; GrGLuint fCurTextureUnit; GrBufferObj* fArrayBuffer; GrBufferObj* fElementArrayBuffer; diff --git a/src/image/SkSurface_Picture.cpp b/src/image/SkSurface_Picture.cpp index ba3ee638d0..bdc84b7a15 100644 --- a/src/image/SkSurface_Picture.cpp +++ b/src/image/SkSurface_Picture.cpp @@ -28,7 +28,6 @@ public: private: SkPicture* fPicture; - SkPicture* fRecordingPicture; typedef SkSurface_Base INHERITED; }; |