diff options
author | 2013-01-07 17:35:10 +0000 | |
---|---|---|
committer | 2013-01-07 17:35:10 +0000 | |
commit | 57313f6472684b14570562e43e84f5e2d6fcf278 (patch) | |
tree | 61930eb1e346f3135c7db53d646930b95cf88b81 /src/core | |
parent | 21cbec4870660f776f470e3a5e327599b6433dd2 (diff) |
Fix warning-as-error for var used only in an assert (and therefore not in the release build).
git-svn-id: http://skia.googlecode.com/svn/trunk@7054 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkColorTable.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkColorTable.cpp b/src/core/SkColorTable.cpp index 1375c5838c..e1ebf9202d 100644 --- a/src/core/SkColorTable.cpp +++ b/src/core/SkColorTable.cpp @@ -146,9 +146,11 @@ SkColorTable::SkColorTable(SkFlattenableReadBuffer& buffer) { fFlags = buffer.readUInt(); fCount = buffer.getArrayCount(); fColors = (SkPMColor*)sk_malloc_throw(fCount * sizeof(SkPMColor)); - const uint32_t countRead = buffer.readColorArray(fColors); + SkDEBUGCODE(const uint32_t countRead =) buffer.readColorArray(fColors); +#ifdef SK_DEBUG SkASSERT((unsigned)fCount <= 256); SkASSERT(countRead == fCount); +#endif } void SkColorTable::flatten(SkFlattenableWriteBuffer& buffer) const { |