[gtk/matthiasc/for-master: 6/6] lpr: Fix various compiler warnings




commit 6d5657eee7a3511e76ab9c59864fdaad06531ec3
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 17 07:56:07 2021 -0400

    lpr: Fix various compiler warnings
    
    gcc 11 is warning about some const mixups here.
    Fix them.

 modules/printbackends/gtkprintbackendlpr.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/modules/printbackends/gtkprintbackendlpr.c b/modules/printbackends/gtkprintbackendlpr.c
index 17ed4fbf3f..ea7770f5a9 100644
--- a/modules/printbackends/gtkprintbackendlpr.c
+++ b/modules/printbackends/gtkprintbackendlpr.c
@@ -103,7 +103,7 @@ char **
 g_io_module_query (void)
 {
   char *eps[] = {
-    GTK_PRINT_BACKEND_EXTENSION_POINT_NAME,
+    (char *)GTK_PRINT_BACKEND_EXTENSION_POINT_NAME,
     NULL
   };
 
@@ -399,13 +399,12 @@ lpr_printer_get_options (GtkPrinter           *printer,
   GtkPrinterOptionSet *set;
   GtkPrinterOption *option;
   const char *command;
-  char *n_up[] = {"1", "2", "4", "6", "9", "16" };
+  const char *n_up[] = {"1", "2", "4", "6", "9", "16" };
 
   set = gtk_printer_option_set_new ();
 
   option = gtk_printer_option_new ("gtk-n-up", _("Pages Per Sheet"), GTK_PRINTER_OPTION_TYPE_PICKONE);
-  gtk_printer_option_choices_from_array (option, G_N_ELEMENTS (n_up),
-                                         (char **)n_up, (char **)n_up);
+  gtk_printer_option_choices_from_array (option, G_N_ELEMENTS (n_up), n_up, n_up);
   gtk_printer_option_set (option, "1");
   gtk_printer_option_set_add (set, option);
   g_object_unref (option);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]