From 67908f2faee17a8bce4d074980617cc0d15fabf1 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 27 Jun 2011 14:47:50 +0000 Subject: [PATCH] fix warnings (signed/unsigned, initialization order, parens) git-svn-id: http://skia.googlecode.com/svn/trunk@1724 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/pipe/SkGPipePriv.h | 8 ++++---- src/pipe/SkGPipeRead.cpp | 2 +- src/pipe/SkGPipeWrite.cpp | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pipe/SkGPipePriv.h b/src/pipe/SkGPipePriv.h index 7122992..6c1103f 100644 --- a/src/pipe/SkGPipePriv.h +++ b/src/pipe/SkGPipePriv.h @@ -116,7 +116,7 @@ static uint32_t DrawOp_packOpFlagData(DrawOps op, unsigned flags, unsigned data) SkASSERT(0 == (flags & ~DRAWOPS_FLAG_MASK)); SkASSERT(0 == (data & ~DRAWOPS_DATA_MASK)); - return (op << DRAWOPS_FLAG_BITS + DRAWOPS_DATA_BITS) | + return (op << (DRAWOPS_FLAG_BITS + DRAWOPS_DATA_BITS)) | (flags << DRAWOPS_DATA_BITS) | data; } @@ -187,14 +187,14 @@ static unsigned PaintOp_unpackData(uint32_t op32) { static uint32_t PaintOp_packOp(PaintOps op) { SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); - return (op << PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS); + return op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS); } static uint32_t PaintOp_packOpData(PaintOps op, unsigned data) { SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); - return (op << PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS) | data; + return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | data; } static uint32_t PaintOp_packOpFlagData(PaintOps op, unsigned flags, unsigned data) { @@ -202,7 +202,7 @@ static uint32_t PaintOp_packOpFlagData(PaintOps op, unsigned flags, unsigned dat SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); - return (op << PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS) | + return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | (flags << PAINTOPS_DATA_BITS) | data; } diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp index 07d4ee2..5fdbfc3 100644 --- a/src/pipe/SkGPipeRead.cpp +++ b/src/pipe/SkGPipeRead.cpp @@ -85,7 +85,7 @@ public: return fFlatArray[index - 1]; } - void defFlattenable(PaintFlats pf, unsigned index) { + void defFlattenable(PaintFlats pf, int index) { SkASSERT(index == fFlatArray.count() + 1); SkFlattenable* obj = fReader->readFlattenable(); *fFlatArray.append() = obj; diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp index b1eebc8..fa93113 100644 --- a/src/pipe/SkGPipeWrite.cpp +++ b/src/pipe/SkGPipeWrite.cpp @@ -238,7 +238,8 @@ int SkGPipeCanvas::flattenToIndex(SkFlattenable* obj, PaintFlats paintflat) { SkGPipeCanvas::SkGPipeCanvas(SkGPipeController* controller, SkWriter32* writer, SkFactorySet* fset) - : fWriter(*writer), fFactorySet(fset) { + : fWriter(*writer) { + fFactorySet = fset; fController = controller; fDone = false; fBlockSize = 0; // need first block from controller -- 2.7.4