Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: src/pdf/SkPDFCatalog.cpp

Issue 12521010: Turning on warning as error on Linux (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/animator/SkDrawExtraPathEffect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFCatalog.cpp
===================================================================
--- src/pdf/SkPDFCatalog.cpp (revision 8038)
+++ src/pdf/SkPDFCatalog.cpp (working copy)
@@ -128,8 +128,11 @@
first++;
}
for (int i = first; i <= last; i++) {
+ // For 32 bits platforms, the maximum offset has to fit within off_t which is a 32 bits
+ // signed integer on these platforms. On other platforms, we can use the actual maximum.
+ SkDEBUGCODE(static const off_t kMaxOff = (sizeof(off_t) > 4) ? 10000000000 : 2147483647;)
SkASSERT(fCatalog[i].fFileOffset > 0);
- SkASSERT(fCatalog[i].fFileOffset <= 9999999999LL);
+ SkASSERT(fCatalog[i].fFileOffset < kMaxOff);
stream->writeBigDecAsText(fCatalog[i].fFileOffset, 10);
stream->writeText(" 00000 n \n");
}
« no previous file with comments | « src/animator/SkDrawExtraPathEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698