From 4e924f67763bab51de49a0a0d2c0bd14d3b32b7f Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Thu, 29 May 2014 13:22:05 +0200 Subject: [PATCH] Change pagenum arguments in PDFDoc::markAnnotations from Guint to int Fixes compile warning: CXX PDFDoc.lo PDFDoc.cc: In member function 'GBool PDFDoc::markAnnotations(Object*, XRef*, XRef*, Guint, Guint, Guint)': PDFDoc.cc:1607:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (obj2.getRef().num == oldPageNum) { ^ PDFDoc.cc:1617:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] } else if (obj2.getRef().num == newPageNum) { https://bugs.freedesktop.org/show_bug.cgi?id=79410 --- poppler/PDFDoc.cc | 4 ++-- poppler/PDFDoc.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index e427d2b..3b3752f 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -1589,7 +1589,7 @@ void PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint n } } -GBool PDFDoc::markAnnotations(Object *annotsObj, XRef *xRef, XRef *countRef, Guint numOffset, Guint oldPageNum, Guint newPageNum) { +GBool PDFDoc::markAnnotations(Object *annotsObj, XRef *xRef, XRef *countRef, Guint numOffset, int oldPageNum, int newPageNum) { Object annots; GBool modified = gFalse; annotsObj->fetch(getXRef(), &annots); @@ -1681,7 +1681,7 @@ GBool PDFDoc::markAnnotations(Object *annotsObj, XRef *xRef, XRef *countRef, Gui return modified; } -void PDFDoc::markAcroForm(Object *afObj, XRef *xRef, XRef *countRef, Guint numOffset, Guint oldPageNum, Guint newPageNum) { +void PDFDoc::markAcroForm(Object *afObj, XRef *xRef, XRef *countRef, Guint numOffset, int oldPageNum, int newPageNum) { Object acroform; GBool modified = gFalse; afObj->fetch(getXRef(), &acroform); diff --git a/poppler/PDFDoc.h b/poppler/PDFDoc.h index d8064e9..fdb7f3b 100644 --- a/poppler/PDFDoc.h +++ b/poppler/PDFDoc.h @@ -249,8 +249,8 @@ public: // rewrite pageDict with MediaBox, CropBox and new page CTM void replacePageDict(int pageNo, int rotate, PDFRectangle *mediaBox, PDFRectangle *cropBox, Object *pageCTM); void markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint numOffset); - GBool markAnnotations(Object *annots, XRef *xRef, XRef *countRef, Guint numOffset, Guint oldPageNum, Guint newPageNum); - void markAcroForm(Object *acrpForm, XRef *xRef, XRef *countRef, Guint numOffset, Guint oldPageNum, Guint newPageNum); + GBool markAnnotations(Object *annots, XRef *xRef, XRef *countRef, Guint numOffset, int oldPageNum, int newPageNum); + void markAcroForm(Object *acrpForm, XRef *xRef, XRef *countRef, Guint numOffset, int oldPageNum, int newPageNum); // write all objects used by pageDict to outStr Guint writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset, GBool combine = gFalse); static void writeObject (Object *obj, OutStream* outStr, XRef *xref, Guint numOffset, Guchar *fileKey, -- 1.8.3.2