[poppler] fofi/FoFiTrueType.cc glib/poppler-annot.cc glib/poppler-attachment.cc glib/poppler-document.cc glib/poppler-form-field.cc glib/poppler-page.cc poppler/Annot.h splash/SplashTypes.h

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Sep 20 07:14:01 PDT 2008


 fofi/FoFiTrueType.cc       |    3 ++-
 glib/poppler-annot.cc      |    8 ++++----
 glib/poppler-attachment.cc |    2 +-
 glib/poppler-document.cc   |    6 +++---
 glib/poppler-form-field.cc |    2 +-
 glib/poppler-page.cc       |    2 +-
 poppler/Annot.h            |    5 +++--
 splash/SplashTypes.h       |    3 ++-
 8 files changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 6961fd8efe3db6ee7077dc2ed072498696dae31a
Author: Tomas Are Haavet <tomasare at gmail.com>
Date:   Sat Sep 20 16:13:37 2008 +0200

    Remove some warnings and errors when compiling with gcc and -pedantic

diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index 1e903c5..8502f24 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -17,6 +17,7 @@
 // Copyright (C) 2007 Koji Otani <sho at bbr.jp>
 // Copyright (C) 2007 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2008 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008 Tomas Are Haavet <tomasare at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -353,7 +354,7 @@ Gushort FoFiTrueType::mapCodeToGID(int i, Guint c) {
   pos = cmaps[i].offset;
   switch (cmaps[i].fmt) {
   case 0:
-    if (c >= cmaps[i].len - 6) {
+    if (c + 6 >= (Guint)cmaps[i].len) {
       return 0;
     }
     gid = getU8(cmaps[i].offset + 6 + c, &ok);
diff --git a/glib/poppler-annot.cc b/glib/poppler-annot.cc
index b7e5819..067afcc 100644
--- a/glib/poppler-annot.cc
+++ b/glib/poppler-annot.cc
@@ -66,10 +66,10 @@ struct _PopplerAnnotFreeTextClass
   PopplerAnnotMarkupClass parent_class;
 };
 
-G_DEFINE_TYPE (PopplerAnnot, poppler_annot, G_TYPE_OBJECT);
-G_DEFINE_TYPE (PopplerAnnotMarkup, poppler_annot_markup, POPPLER_TYPE_ANNOT);
-G_DEFINE_TYPE (PopplerAnnotText, poppler_annot_text, POPPLER_TYPE_ANNOT_MARKUP);
-G_DEFINE_TYPE (PopplerAnnotFreeText, poppler_annot_free_text, POPPLER_TYPE_ANNOT_MARKUP);
+G_DEFINE_TYPE (PopplerAnnot, poppler_annot, G_TYPE_OBJECT)
+G_DEFINE_TYPE (PopplerAnnotMarkup, poppler_annot_markup, POPPLER_TYPE_ANNOT)
+G_DEFINE_TYPE (PopplerAnnotText, poppler_annot_text, POPPLER_TYPE_ANNOT_MARKUP)
+G_DEFINE_TYPE (PopplerAnnotFreeText, poppler_annot_free_text, POPPLER_TYPE_ANNOT_MARKUP)
 
 static void
 poppler_annot_finalize (GObject *object)
diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc
index db77f11..b51dbbe 100644
--- a/glib/poppler-attachment.cc
+++ b/glib/poppler-attachment.cc
@@ -36,7 +36,7 @@ struct _PopplerAttachmentPrivate
 
 static void poppler_attachment_finalize (GObject *obj);
 
-G_DEFINE_TYPE (PopplerAttachment, poppler_attachment, G_TYPE_OBJECT);
+G_DEFINE_TYPE (PopplerAttachment, poppler_attachment, G_TYPE_OBJECT)
 
 static void
 poppler_attachment_init (PopplerAttachment *attachment)
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index 622aff8..7637af4 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -59,7 +59,7 @@ struct _PopplerDocumentClass
   GObjectClass parent_class;
 };
 
-G_DEFINE_TYPE (PopplerDocument, poppler_document, G_TYPE_OBJECT);
+G_DEFINE_TYPE (PopplerDocument, poppler_document, G_TYPE_OBJECT)
 
 static PopplerDocument *
 _poppler_document_new_from_pdfdoc (PDFDoc  *newDoc,
@@ -1275,7 +1275,7 @@ struct _PopplerFontInfoClass
         GObjectClass parent_class;
 };
 
-G_DEFINE_TYPE (PopplerFontInfo, poppler_font_info, G_TYPE_OBJECT);
+G_DEFINE_TYPE (PopplerFontInfo, poppler_font_info, G_TYPE_OBJECT)
 
 static void poppler_font_info_finalize (GObject *object);
 
@@ -1358,7 +1358,7 @@ struct _PopplerPSFileClass
         GObjectClass parent_class;
 };
 
-G_DEFINE_TYPE (PopplerPSFile, poppler_ps_file, G_TYPE_OBJECT);
+G_DEFINE_TYPE (PopplerPSFile, poppler_ps_file, G_TYPE_OBJECT)
 
 static void poppler_ps_file_finalize (GObject *object);
 
diff --git a/glib/poppler-form-field.cc b/glib/poppler-form-field.cc
index 47824ae..d5c1975 100644
--- a/glib/poppler-form-field.cc
+++ b/glib/poppler-form-field.cc
@@ -27,7 +27,7 @@ struct _PopplerFormFieldClass
   GObjectClass parent_class;
 };
 
-G_DEFINE_TYPE (PopplerFormField, poppler_form_field, G_TYPE_OBJECT);
+G_DEFINE_TYPE (PopplerFormField, poppler_form_field, G_TYPE_OBJECT)
 
 static void
 poppler_form_field_finalize (GObject *object)
diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index cf737cd..405e0e6 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -44,7 +44,7 @@ struct _PopplerPageClass
   GObjectClass parent_class;
 };
 
-G_DEFINE_TYPE (PopplerPage, poppler_page, G_TYPE_OBJECT);
+G_DEFINE_TYPE (PopplerPage, poppler_page, G_TYPE_OBJECT)
 
 PopplerPage *
 _poppler_page_new (PopplerDocument *document, Page *page, int index)
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 6d05823..ebd3e74 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -20,6 +20,7 @@
 // Copyright (C) 2008 Michael Vrable <mvrable at cs.ucsd.edu>
 // Copyright (C) 2008 Hugo Mercier <hmercier31 at gmail.com>
 // Copyright (C) 2008 Pino Toscano <pino at kde.org>
+// Copyright (C) 2008 Tomas Are Haavet <tomasare at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -207,7 +208,7 @@ public:
   enum AnnotBorderType {
     typeUnknown,
     typeArray,
-    typeBS,
+    typeBS
   };
 
   enum AnnotBorderStyle {
@@ -215,7 +216,7 @@ public:
     borderDashed,     // Dashed
     borderBeveled,    // Beveled
     borderInset,      // Inset
-    borderUnderlined, // Underlined
+    borderUnderlined  // Underlined
   };
 
   AnnotBorder();
diff --git a/splash/SplashTypes.h b/splash/SplashTypes.h
index 6560ab9..ba12a82 100644
--- a/splash/SplashTypes.h
+++ b/splash/SplashTypes.h
@@ -12,6 +12,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2006 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008 Tomas Are Haavet <tomasare at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -52,7 +53,7 @@ enum SplashColorMode {
 				//   RGBRGB...
   splashModeBGR8,		// 1 byte per component, 3 bytes per pixel:
 				//   BGRBGR...
-  splashModeXBGR8,	// 1 byte per component, 4 bytes per pixel:
+  splashModeXBGR8		// 1 byte per component, 4 bytes per pixel:
 				//   XBGRXBGR...
 #if SPLASH_CMYK
   ,


More information about the poppler mailing list