[poppler] 3 commits - poppler/CairoOutputDev.cc test/gtk-cairo-test.cc test/pdf-inspector.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Dec 24 08:49:12 PST 2008


 poppler/CairoOutputDev.cc |   13 +++++++------
 test/gtk-cairo-test.cc    |   11 -----------
 test/pdf-inspector.cc     |   11 ++++++-----
 3 files changed, 13 insertions(+), 22 deletions(-)

New commits:
commit 08cef528f2e51cc62cff4125f179021ad9555317
Author: Hib Eris <hib at hiberis.nl>
Date:   Wed Dec 24 17:48:46 2008 +0100

    Fix compile warning on string literal format

diff --git a/test/pdf-inspector.cc b/test/pdf-inspector.cc
index 4a8c2c1..aba4a71 100644
--- a/test/pdf-inspector.cc
+++ b/test/pdf-inspector.cc
@@ -306,7 +306,7 @@ PdfInspector::load(const char *file_name)
 void
 PdfInspector::error_dialog (const char *error_message)
 {
-  g_warning (error_message);
+  g_warning ("%s", error_message);
 }
 
 void
commit 0606b4bba8e889204c7b7c9d376f63b659f83a4f
Author: Hib Eris <hib at hiberis.nl>
Date:   Wed Dec 24 17:48:10 2008 +0100

    Fix compile warnings on parentheses and/or

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 843b40b..6e79785 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -23,6 +23,7 @@
 // Copyright (C) 2008 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2008 Michael Vrable <mvrable at cs.ucsd.edu>
 // Copyright (C) 2008 Chris Wilson <chris at chris-wilson.co.uk>
+// Copyright (C) 2008 Hib Eris <hib at hiberis.nl>
 //
 // 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
@@ -1477,8 +1478,8 @@ void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
   /* ICCBased color space doesn't do any color correction
    * so check its underlying color space as well */
   is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
-		  colorMap->getColorSpace()->getMode() == csICCBased && 
-		  ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB;
+		  (colorMap->getColorSpace()->getMode() == csICCBased && 
+		   ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
 
   for (y = 0; y < height; y++) {
     dest = (unsigned int *) (buffer + y * 4 * width);
@@ -1593,8 +1594,8 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s
   /* ICCBased color space doesn't do any color correction
    * so check its underlying color space as well */
   is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
-		  colorMap->getColorSpace()->getMode() == csICCBased && 
-		  ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB;
+		  (colorMap->getColorSpace()->getMode() == csICCBased && 
+		   ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
 
   for (y = 0; y < height; y++) {
     dest = (unsigned int *) (buffer + y * 4 * width);
@@ -1685,8 +1686,8 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   /* ICCBased color space doesn't do any color correction
    * so check its underlying color space as well */
   is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
-		  colorMap->getColorSpace()->getMode() == csICCBased && 
-		  ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB;
+		  (colorMap->getColorSpace()->getMode() == csICCBased && 
+		   ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
 
   if (maskColors) {
     for (y = 0; y < height; y++) {
commit eba2232cabd5fb1e177db2a6053f0d1a0aee882b
Author: Hib Eris <hib at hiberis.nl>
Date:   Wed Dec 24 17:46:32 2008 +0100

    Fix some more warnings

diff --git a/test/gtk-cairo-test.cc b/test/gtk-cairo-test.cc
index 9a15456..913f46d 100644
--- a/test/gtk-cairo-test.cc
+++ b/test/gtk-cairo-test.cc
@@ -36,8 +36,6 @@ drawing_area_expose (GtkWidget      *drawing_area,
                      void           *data)
 {
   View *v = (View*) data;
-  GdkRectangle document;
-  GdkRectangle draw;
   cairo_t *cr;
 
   gdk_window_clear (drawing_area->window);
@@ -51,7 +49,6 @@ drawing_area_expose (GtkWidget      *drawing_area,
 static void
 view_set_page (View *v, int page)
 {
-  int err;
   int w, h;
   double width, height;
   cairo_t *cr;
@@ -71,14 +68,6 @@ view_set_page (View *v, int page)
 }
 
 static void
-redraw_callback (void *data)
-{
-  View *v = (View*) data;
-
-  gtk_widget_queue_draw (v->drawing_area);
-}
-
-static void
 page_changed_callback (GtkSpinButton *button, View *v)
 {
     int page;
diff --git a/test/pdf-inspector.cc b/test/pdf-inspector.cc
index d707a6d..4a8c2c1 100644
--- a/test/pdf-inspector.cc
+++ b/test/pdf-inspector.cc
@@ -156,7 +156,7 @@ void
 PdfInspector::on_selection_changed (GtkTreeSelection *selection, PdfInspector *inspector)
 {
   GtkWidget *label;
-  int i;
+  size_t i;
   GtkTreeModel *model;
   GtkTreeIter iter;
   gchar *op = NULL;
@@ -211,7 +211,7 @@ PdfInspector::analyze_page (int page)
   GooHashIter *iter;
   GooHash *hash;
   GooString *key;
-  ProfileData *data_p;
+  void *p;
   GtkWidget *label;
   char *text;
 
@@ -231,10 +231,11 @@ PdfInspector::analyze_page (int page)
   // Individual times;
   hash = output->endProfile ();
   hash->startIter(&iter);
-  while (hash->getNext(&iter, &key, (void**) &data_p))
+  while (hash->getNext(&iter, &key, &p))
     {
       GtkTreeIter tree_iter;
-      
+      ProfileData *data_p = (ProfileData *) p;
+
       gtk_list_store_append (GTK_LIST_STORE (model), &tree_iter);
       gtk_list_store_set (GTK_LIST_STORE (model), &tree_iter,
 			  OP_STRING, key->getCString(),


More information about the poppler mailing list