mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
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
This commit is contained in:
parent
6af8894003
commit
9e9d028b96
@ -684,7 +684,7 @@ unescape_gstring_inplace (GMarkupParseContext *context,
|
||||
"inside a character reference "
|
||||
"(ê 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,
|
||||
|
Loading…
Reference in New Issue
Block a user