- Uninitialized class member in GSCanonicalEntry and SkPDFDocument.
- Incorrect sign extension in SkPDFFont.
- Dead code in SkPDFUtils.
CID=16262,16272,16273,16275
Review URL: http://codereview.appspot.com/4659041
git-svn-id: http://skia.googlecode.com/svn/trunk@1668
2bbb7eff-a529-9590-31e7-
b0007b416f81
explicit GSCanonicalEntry(SkPDFGraphicState* gs)
: fGraphicState(gs),
fPaint(&gs->fPaint) {}
- explicit GSCanonicalEntry(const SkPaint* paint) : fPaint(paint) {}
+ explicit GSCanonicalEntry(const SkPaint* paint)
+ : fGraphicState(NULL),
+ fPaint(paint) {}
};
// This should be made a hash table if performance is a problem.
}
}
-SkPDFDocument::SkPDFDocument() : fXRefFileOffset(0) {
+SkPDFDocument::SkPDFDocument()
+ : fXRefFileOffset(0),
+ fSecondPageFirstResourceIndex(0) {
fDocCatalog = new SkPDFDict("Catalog");
fDocCatalog->unref(); // SkRefPtr and new both took a reference.
fCatalog.addObject(fDocCatalog.get(), true);
if (*len < 6)
return false;
- *size = buf[2] | (buf[3] << 8) | (buf[4] << 16) | (buf[5] << 24);
+ *size = (size_t)buf[2] | ((size_t)buf[3] << 8) | ((size_t)buf[4] << 16) |
+ ((size_t)buf[5] << 24);
size_t consumed = *size + 6;
if (consumed > *len)
return false;
case SkPath::kClose_Verb:
ClosePath(content);
break;
- case SkPath::kDone_Verb:
- break;
default:
SkASSERT(false);
break;