From d9e0181405c9853ffd20502555200205a5ab09b1 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Wed, 29 Aug 2012 19:35:44 +0000 Subject: [PATCH] Linux warning fixes Review URL: https://codereview.appspot.com/6500045/ git-svn-id: http://skia.googlecode.com/svn/trunk@5337 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/GrMemoryPool.cpp | 2 +- src/gpu/gl/GrGLSL.cpp | 2 +- src/gpu/gl/GrGLShaderBuilder.cpp | 4 ++-- src/image/SkImage_Raster.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gpu/GrMemoryPool.cpp b/src/gpu/GrMemoryPool.cpp index 01f303f..17d70ab 100644 --- a/src/gpu/GrMemoryPool.cpp +++ b/src/gpu/GrMemoryPool.cpp @@ -110,7 +110,7 @@ GrMemoryPool::BlockHeader* GrMemoryPool::CreateBlock(size_t size) { block->fLiveCount = 0; block->fFreeSize = size; block->fCurrPtr = reinterpret_cast(block) + kHeaderSize; - block->fPrevPtr = NULL; + block->fPrevPtr = 0; // gcc warns on assigning NULL to an intptr_t. return block; } diff --git a/src/gpu/gl/GrGLSL.cpp b/src/gpu/gl/GrGLSL.cpp index 21e9183..c995a34 100644 --- a/src/gpu/gl/GrGLSL.cpp +++ b/src/gpu/gl/GrGLSL.cpp @@ -115,7 +115,7 @@ GrSLConstantVec GrGLSLModulate4f(SkString* outAppend, outAppend->append(GrGLSLZerosVecf(4)); return kZeros_GrSLConstantVec; } else { - outAppend->appendf(GrGLSLOnesVecf(4)); + outAppend->append(GrGLSLOnesVecf(4)); return kOnes_GrSLConstantVec; } } else if (!has0) { diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp index 5aa3a54..c061468 100644 --- a/src/gpu/gl/GrGLShaderBuilder.cpp +++ b/src/gpu/gl/GrGLShaderBuilder.cpp @@ -77,10 +77,10 @@ GrGLShaderBuilder::GrGLShaderBuilder(const GrGLContextInfo& ctx, GrGLUniformMana , fFSInputs(kVarsPerBlock) , fFSOutputs(kMaxFSOutputs) , fUsesGS(false) - , fTexCoordVaryingType(kVoid_GrSLType) , fContext(ctx) , fUniformManager(uniformManager) - , fCurrentStage(kNonStageIdx) { + , fCurrentStage(kNonStageIdx) + , fTexCoordVaryingType(kVoid_GrSLType) { } void GrGLShaderBuilder::computeSwizzle(uint32_t configFlags) { diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp index daed241..c9a132d 100644 --- a/src/image/SkImage_Raster.cpp +++ b/src/image/SkImage_Raster.cpp @@ -43,7 +43,7 @@ public: } int64_t size = (int64_t)info.fHeight * rowBytes; - if (size > kMaxPixelByteSize) { + if (size > (int64_t)kMaxPixelByteSize) { return false; } return true; -- 2.7.4