diff options
author | 2013-03-07 20:52:59 +0000 | |
---|---|---|
committer | 2013-03-07 20:52:59 +0000 | |
commit | 9c55f801a35b0d6c39f007fae432bd13094f3c52 (patch) | |
tree | 67523b0ff3fb50f0346c3b7beb0a429304e71d7f /src/gpu | |
parent | 428fc4a37b66ac927d5b8c3a2938e578ea70cbb8 (diff) |
Fixing some warnings on Linux
There were only a few warnings left, so I fixed them and enabled the unused variable warning by removing the "-Wno-unused" flag. Only the -Wno-unused-parameter remains for now (could be removed later).
Review URL: https://codereview.chromium.org/12480002
git-svn-id: http://skia.googlecode.com/svn/trunk@8030 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/gl/GrGLShaderBuilder.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gr_unittests.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp index 02d6d383b7..5c3f5b3fe8 100644 --- a/src/gpu/gl/GrGLShaderBuilder.cpp +++ b/src/gpu/gl/GrGLShaderBuilder.cpp @@ -102,7 +102,7 @@ GrGLShaderBuilder::GrGLShaderBuilder(const GrGLContextInfo& ctxInfo, } void GrGLShaderBuilder::codeAppendf(ShaderType type, const char format[], va_list args) { - SkString* string; + SkString* string = NULL; switch (type) { case kVertex_ShaderType: string = &fVSCode; @@ -120,7 +120,7 @@ void GrGLShaderBuilder::codeAppendf(ShaderType type, const char format[], va_lis } void GrGLShaderBuilder::codeAppend(ShaderType type, const char* str) { - SkString* string; + SkString* string = NULL; switch (type) { case kVertex_ShaderType: string = &fVSCode; diff --git a/src/gpu/gr_unittests.cpp b/src/gpu/gr_unittests.cpp index c7daf7718f..ab5049a36a 100644 --- a/src/gpu/gr_unittests.cpp +++ b/src/gpu/gr_unittests.cpp @@ -17,6 +17,7 @@ void gr_run_unittests(); // If we aren't inheriting these as #defines from elsewhere, // clang demands they be declared before we #include the template // that relies on them. +#if GR_DEBUG static bool LT(const int& elem, int value) { return elem < value; } @@ -39,6 +40,7 @@ static void test_bsearch() { } } } +#endif // bogus empty class for GrBinHashKey class BogusEntry {}; @@ -72,7 +74,7 @@ static void test_binHashKey() void gr_run_unittests() { - test_bsearch(); + GR_DEBUGCODE(test_bsearch();) test_binHashKey(); GrRedBlackTree<int>::UnitTest(); GrDrawState::VertexAttributesUnitTest(); |