From f317bce17f7b2ced268aeac03db0a9d6dbeb0c04 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Tue, 27 Nov 2012 19:38:59 +0100 Subject: [PATCH 10/10] Fix set but unused warning in glib/demo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: CC print.o ../../../poppler/glib/demo/print.c: In function ‘pgd_print_draw_page’: ../../../poppler/glib/demo/print.c:68:27: warning: variable ‘settings’ set but not used [-Wunused-but-set-variable] --- glib/demo/print.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/glib/demo/print.c b/glib/demo/print.c index 8147036..f77b0a3 100644 --- a/glib/demo/print.c +++ b/glib/demo/print.c @@ -65,7 +65,9 @@ pgd_print_draw_page (GtkPrintOperation *op, { PopplerPage *page; cairo_t *cr; +#if 0 GtkPrintSettings *settings; +#endif PgdPrintOptions options; PopplerPrintFlags flags = 0; @@ -73,13 +75,14 @@ pgd_print_draw_page (GtkPrintOperation *op, if (!page) return; - settings = gtk_print_operation_get_print_settings (op); - /* Workaround for gtk+ bug, we need to save the options ourselves */ - options = demo->options; #if 0 + settings = gtk_print_operation_get_print_settings (op); options = gtk_print_settings_get_int_with_default (settings, PGD_PRINT_OPTIONS, PRINT_DOCUMENT_MARKUPS); +#else + /* Workaround for gtk+ bug, we need to save the options ourselves */ + options = demo->options; #endif switch (options) { case PRINT_DOCUMENT: -- 1.7.5.4