[glib] Fix build with -Werror=format



commit 9e9d028b96b3e19902a40b930418a0ec3e30ccfc
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jan 19 14:30:05 2013 -0500

    Fix build with -Werror=format
    
    There were a few places in gmarkup.c where we were giving
    pointer differences when integers are expected. Fix that
    by explicitly casting to int.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692079

 glib/gmarkup.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/gmarkup.c b/glib/gmarkup.c
index bf7c008..552773f 100644
--- a/glib/gmarkup.c
+++ b/glib/gmarkup.c
@@ -684,7 +684,7 @@ unescape_gstring_inplace (GMarkupParseContext  *context,
                                         "inside a character reference "
                                         "(&#234; for example) - perhaps "
                                         "the digit is too large"),
-                                      end - from, from);
+                                      (int)(end - from), from);
                   return FALSE;
                 }
               else if (*end != ';')
@@ -719,7 +719,7 @@ unescape_gstring_inplace (GMarkupParseContext  *context,
                                           from, G_MARKUP_ERROR_PARSE,
                                           _("Character reference '%-.*s' does not "
                                             "encode a permitted character"),
-                                          end - from, from);
+                                          (int)(end - from), from);
                       return FALSE;
                     }
                 }
@@ -764,7 +764,7 @@ unescape_gstring_inplace (GMarkupParseContext  *context,
                     set_unescape_error (context, error,
                                         from, G_MARKUP_ERROR_PARSE,
                                         _("Entity name '%-.*s' is not known"),
-                                        end-from, from);
+                                        (int)(end - from), from);
                   else
                     set_unescape_error (context, error,
                                         from, G_MARKUP_ERROR_PARSE,



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