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

Unified Diff: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp

Issue 18293014: pdfviewer: fix warnings on mac (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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
Index: experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp (revision 9966)
+++ experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp (working copy)
@@ -17,21 +17,21 @@
-long getFileSize(const char* filename)
+static long getFileSize(const char* filename)
{
struct stat stat_buf;
int rc = stat(filename, &stat_buf);
- return rc == 0 ? stat_buf.st_size : -1;
+ return rc == 0 ? (long)stat_buf.st_size : -1;
}
-unsigned char* lineHome(unsigned char* start, unsigned char* current) {
+static unsigned char* lineHome(unsigned char* start, unsigned char* current) {
while (current > start && !isPdfEOL(*(current - 1))) {
current--;
}
return current;
}
-unsigned char* previousLineHome(unsigned char* start, unsigned char* current) {
+static unsigned char* previousLineHome(unsigned char* start, unsigned char* current) {
if (current > start && isPdfEOL(*(current - 1))) {
current--;
}
@@ -48,7 +48,7 @@
return current;
}
-unsigned char* ignoreLine(unsigned char* current, unsigned char* end) {
+static unsigned char* ignoreLine(unsigned char* current, unsigned char* end) {
while (current < end && !isPdfEOL(*current)) {
current++;
}
@@ -122,7 +122,7 @@
return previous;
}
- int startId = token.intValue();
+ int startId = (int)token.intValue();
token.reset();
current = nextObject(current, trailerEnd, &token, NULL);
@@ -131,7 +131,7 @@
return current;
}
- int entries = token.intValue();
+ int entries = (int)token.intValue();
for (int i = 0; i < entries; i++) {
token.reset();
@@ -140,7 +140,7 @@
// TODO(edisonn): report/warning
return current;
}
- int offset = token.intValue();
+ int offset = (int)token.intValue();
token.reset();
current = nextObject(current, trailerEnd, &token, NULL);
@@ -148,7 +148,7 @@
// TODO(edisonn): report/warning
return current;
}
- int generation = token.intValue();
+ int generation = (int)token.intValue();
token.reset();
current = nextObject(current, trailerEnd, &token, NULL);
@@ -181,7 +181,7 @@
}
if (trailer->has_Prev()) {
- return trailer->Prev(NULL);
+ return (long)trailer->Prev(NULL);
}
return -1;
« no previous file with comments | « experimental/PdfViewer/SkPdfParser.cpp ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698