From 870bac8fd0515c8c383ff47a13192e898da4c485 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 18 Apr 2008 14:51:26 +0000 Subject: [PATCH] change return value and local variable to const gchar* to fix warning 2008-04-18 Michael Natterer * modules/printbackends/cups/gtkprintercups.[ch] (gtk_printer_cups_get_ppd_name): change return value and local variable to const gchar* to fix warning about discarding const qualifier. svn path=/trunk/; revision=20021 --- ChangeLog | 7 +++++++ modules/printbackends/cups/gtkprintercups.c | 5 ++--- modules/printbackends/cups/gtkprintercups.h | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14d9c83d77..f6c5cdccb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-18 Michael Natterer + + * modules/printbackends/cups/gtkprintercups.[ch] + (gtk_printer_cups_get_ppd_name): change return value and local + variable to const gchar* to fix warning about discarding const + qualifier. + 2008-04-18 Emmanuele Bassi * gtk/gtkrecentmanager.c: diff --git a/modules/printbackends/cups/gtkprintercups.c b/modules/printbackends/cups/gtkprintercups.c index 21ae2c6837..e54361957b 100644 --- a/modules/printbackends/cups/gtkprintercups.c +++ b/modules/printbackends/cups/gtkprintercups.c @@ -127,10 +127,10 @@ gtk_printer_cups_get_ppd (GtkPrinterCups *printer) return printer->ppd_file; } -char * +const gchar * gtk_printer_cups_get_ppd_name (GtkPrinterCups *printer) { - gchar *result; + const gchar *result; result = printer->ppd_name; @@ -139,4 +139,3 @@ gtk_printer_cups_get_ppd_name (GtkPrinterCups *printer) return result; } - diff --git a/modules/printbackends/cups/gtkprintercups.h b/modules/printbackends/cups/gtkprintercups.h index d33a5ab5eb..7e2734703f 100644 --- a/modules/printbackends/cups/gtkprintercups.h +++ b/modules/printbackends/cups/gtkprintercups.h @@ -16,10 +16,10 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + #ifndef __GTK_PRINTER_CUPS_H__ #define __GTK_PRINTER_CUPS_H__ -#include #include #include #include @@ -65,7 +65,7 @@ void gtk_printer_cups_register_type (GTypeModule *module GtkPrinterCups *gtk_printer_cups_new (const char *name, GtkPrintBackend *backend); ppd_file_t *gtk_printer_cups_get_ppd (GtkPrinterCups *printer); -char *gtk_printer_cups_get_ppd_name (GtkPrinterCups *printer); +const gchar *gtk_printer_cups_get_ppd_name (GtkPrinterCups *printer); G_END_DECLS