From df7ffac1abb2328b91bb87306f6e77807cc4e10d Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sun, 28 Sep 2008 17:09:18 +0000 Subject: [PATCH] Fix several compile warnings in the dvi backend. 2008-09-28 Carlos Garcia Campos * backend/dvi/Makefile.am: * backend/dvi/cairo-device.c: * backend/dvi/dvi-document.c: * backend/dvi/mdvi-lib/Makefile.am: Fix several compile warnings in the dvi backend. svn path=/trunk/; revision=3211 --- ChangeLog | 9 +++++++++ backend/dvi/Makefile.am | 4 +++- backend/dvi/cairo-device.c | 6 +++--- backend/dvi/dvi-document.c | 4 +++- backend/dvi/mdvi-lib/Makefile.am | 1 + 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ecdf7b2d..6a2ae61b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-28 Carlos Garcia Campos + + * backend/dvi/Makefile.am: + * backend/dvi/cairo-device.c: + * backend/dvi/dvi-document.c: + * backend/dvi/mdvi-lib/Makefile.am: + + Fix several compile warnings in the dvi backend. + 2008-09-28 Carlos Garcia Campos * backend/dvi/mdvi-lib/common.h: diff --git a/backend/dvi/Makefile.am b/backend/dvi/Makefile.am index 2f6c9f70..49bb5188 100644 --- a/backend/dvi/Makefile.am +++ b/backend/dvi/Makefile.am @@ -7,8 +7,10 @@ INCLUDES = \ -I$(top_srcdir)/libdocument \ -I$(srcdir)/mdvi-lib \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + $(WARN_CFLAGS) \ $(BACKEND_CFLAGS) \ - $(SPECTRE_CFLAGS) + $(SPECTRE_CFLAGS) \ + $(DISABLE_DEPRECATED) backend_LTLIBRARIES = libdvidocument.la diff --git a/backend/dvi/cairo-device.c b/backend/dvi/cairo-device.c index b8ec39e6..992728dc 100644 --- a/backend/dvi/cairo-device.c +++ b/backend/dvi/cairo-device.c @@ -18,6 +18,7 @@ #include +#include #include #ifdef HAVE_SPECTRE #include @@ -244,7 +245,6 @@ dvi_cairo_free_image (void *ptr) static void dvi_cairo_put_pixel (void *image, int x, int y, Ulong color) { - cairo_t *cr; cairo_surface_t *surface; gint rowstride; guchar *p; @@ -319,7 +319,7 @@ mdvi_cairo_device_render (DviContext* dvi) gint page_width; gint page_height; cairo_surface_t *surface; - gchar *pixels; + guchar *pixels; gint rowstride; static const cairo_user_data_key_t key; @@ -332,7 +332,7 @@ mdvi_cairo_device_render (DviContext* dvi) page_height = dvi->dvi_page_h * dvi->params.vconv + 2 * cairo_device->ymargin; rowstride = page_width * 4; - pixels = (gchar *) g_malloc (page_height * rowstride); + pixels = (guchar *) g_malloc (page_height * rowstride); memset (pixels, 0xff, page_height * rowstride); surface = cairo_image_surface_create_for_data (pixels, diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c index 87bf46a9..c5f5f792 100644 --- a/backend/dvi/dvi-document.c +++ b/backend/dvi/dvi-document.c @@ -19,17 +19,19 @@ #include "config.h" -#include #include "dvi-document.h" #include "ev-document-thumbnails.h" #include "ev-document-misc.h" #include "ev-file-exporter.h" +#include "ev-file-helpers.h" #include "mdvi.h" #include "fonts.h" +#include "color.h" #include "cairo-device.h" #include +#include GMutex *dvi_context_mutex = NULL; diff --git a/backend/dvi/mdvi-lib/Makefile.am b/backend/dvi/mdvi-lib/Makefile.am index 73417e16..0a09e20f 100644 --- a/backend/dvi/mdvi-lib/Makefile.am +++ b/backend/dvi/mdvi-lib/Makefile.am @@ -1,3 +1,4 @@ +INCLUDES = $(WARN_CFLAGS) noinst_LTLIBRARIES = libmdvi.la libmdvi_la_SOURCES = \ -- 2.43.5