Commit 6961fd8e authored by Tomas Are Haavet's avatar Tomas Are Haavet Committed by Albert Astals Cid

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

parent 4e9a04da
......@@ -17,6 +17,7 @@
// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2008 Tomas Are Haavet <tomasare@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);
......
......@@ -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)
......
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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)
......
......@@ -20,6 +20,7 @@
// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
// Copyright (C) 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2008 Tomas Are Haavet <tomasare@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();
......
......@@ -12,6 +12,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2008 Tomas Are Haavet <tomasare@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
,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment