[poppler] utils/pdfunite.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Jun 1 06:14:23 PDT 2013


 utils/pdfunite.cc |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a0b48b1d05f08605bca5e1a2e2518e16578f6055
Author: Hib Eris <hib at hiberis.nl>
Date:   Sat Jun 1 14:42:42 2013 +0200

    Fix printf format warning for size_t
    
    Fixes:
    
      CXX    pdfunite.o
    pdfunite.cc: In function ‘int main(int, char**)’:
    pdfunite.cc:142:59: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::vector<Object>::size_type {aka long unsigned int}’ [-Wformat]
    
    https://bugs.freedesktop.org/show_bug.cgi?id=65242

diff --git a/utils/pdfunite.cc b/utils/pdfunite.cc
index 071a0d3..59b6a8f 100644
--- a/utils/pdfunite.cc
+++ b/utils/pdfunite.cc
@@ -9,6 +9,7 @@
 // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2012 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
+// Copyright (C) 2013 Hib Eris <hib at hiberis.nl>
 //
 //========================================================================
 #include <PDFDoc.h>
@@ -139,7 +140,7 @@ int main (int argc, char *argv[])
   outStr->printf("<< /Type /Pages /Kids [");
   for (j = 0; j < (int) pages.size(); j++)
     outStr->printf(" %d 0 R", rootNum + j + 2);
-  outStr->printf(" ] /Count %d >>\nendobj\n", pages.size());
+  outStr->printf(" ] /Count %zd >>\nendobj\n", pages.size());
   objectsCount++;
 
   for (i = 0; i < (int) pages.size(); i++) {


More information about the poppler mailing list