mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-14 19:48:05 +02:00
Merge branch 'fix_more_warnings' into 'master'
Fix more warnings See merge request GNOME/glib!1940
This commit is contained in:
commit
4946569730
@ -47,10 +47,12 @@ static const struct help_topic topics[] = {
|
|||||||
N_("[COMMAND]")
|
N_("[COMMAND]")
|
||||||
},
|
},
|
||||||
{ "version", N_("Print version"),
|
{ "version", N_("Print version"),
|
||||||
N_("Print version information and exit")
|
N_("Print version information and exit"),
|
||||||
|
NULL
|
||||||
},
|
},
|
||||||
{ "list-apps", N_("List applications"),
|
{ "list-apps", N_("List applications"),
|
||||||
N_("List the installed D-Bus activatable applications (by .desktop files)")
|
N_("List the installed D-Bus activatable applications (by .desktop files)"),
|
||||||
|
NULL
|
||||||
},
|
},
|
||||||
{ "launch", N_("Launch an application"),
|
{ "launch", N_("Launch an application"),
|
||||||
N_("Launch the application (with optional files to open)"),
|
N_("Launch the application (with optional files to open)"),
|
||||||
@ -85,7 +87,7 @@ app_help (gboolean requested,
|
|||||||
|
|
||||||
if (command)
|
if (command)
|
||||||
{
|
{
|
||||||
gint i;
|
gsize i;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (topics); i++)
|
for (i = 0; i < G_N_ELEMENTS (topics); i++)
|
||||||
if (g_str_equal (topics[i].command, command))
|
if (g_str_equal (topics[i].command, command))
|
||||||
@ -102,8 +104,8 @@ app_help (gboolean requested,
|
|||||||
|
|
||||||
if (topic)
|
if (topic)
|
||||||
{
|
{
|
||||||
gint maxwidth;
|
guint maxwidth;
|
||||||
gint i;
|
gsize i;
|
||||||
|
|
||||||
g_string_append_printf (string, "\n %s %s %s\n\n", "gapplication",
|
g_string_append_printf (string, "\n %s %s %s\n\n", "gapplication",
|
||||||
topic->command, topic->synopsis ? _(topic->synopsis) : "");
|
topic->command, topic->synopsis ? _(topic->synopsis) : "");
|
||||||
@ -127,8 +129,8 @@ app_help (gboolean requested,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gint maxwidth;
|
guint maxwidth;
|
||||||
gint i;
|
gsize i;
|
||||||
|
|
||||||
g_string_append_printf (string, "\n %s %s %s\n\n", "gapplication", _("COMMAND"), _("[ARGS…]"));
|
g_string_append_printf (string, "\n %s %s %s\n\n", "gapplication", _("COMMAND"), _("[ARGS…]"));
|
||||||
g_string_append_printf (string, _("Commands:\n"));
|
g_string_append_printf (string, _("Commands:\n"));
|
||||||
|
@ -896,7 +896,8 @@ g_buffered_input_stream_seek (GSeekable *seekable,
|
|||||||
|
|
||||||
if (type == G_SEEK_CUR)
|
if (type == G_SEEK_CUR)
|
||||||
{
|
{
|
||||||
if (offset <= priv->end - priv->pos && offset >= -priv->pos)
|
if (offset <= (goffset) (priv->end - priv->pos) &&
|
||||||
|
offset >= (goffset) -priv->pos)
|
||||||
{
|
{
|
||||||
priv->pos += offset;
|
priv->pos += offset;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -916,7 +916,7 @@ handle_call (gint *argc,
|
|||||||
GPtrArray *in_signature_types;
|
GPtrArray *in_signature_types;
|
||||||
#ifdef G_OS_UNIX
|
#ifdef G_OS_UNIX
|
||||||
GUnixFDList *fd_list;
|
GUnixFDList *fd_list;
|
||||||
guint fd_id;
|
gint fd_id;
|
||||||
#endif
|
#endif
|
||||||
gboolean complete_names;
|
gboolean complete_names;
|
||||||
gboolean complete_paths;
|
gboolean complete_paths;
|
||||||
|
@ -482,7 +482,7 @@ unescape_string (const gchar *escaped_string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*out = '\0';
|
*out = '\0';
|
||||||
g_warn_if_fail (out - result <= strlen (escaped_string));
|
g_warn_if_fail ((gsize) (out - result) <= strlen (escaped_string));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@ g_memory_output_stream_seek (GSeekable *seekable,
|
|||||||
* stream is valid (eg: a 1-byte fixed sized stream can have position
|
* stream is valid (eg: a 1-byte fixed sized stream can have position
|
||||||
* 0 or 1). Therefore '>' is what we want.
|
* 0 or 1). Therefore '>' is what we want.
|
||||||
* */
|
* */
|
||||||
if (priv->realloc_fn == NULL && absolute > priv->len)
|
if (priv->realloc_fn == NULL && (gsize) absolute > priv->len)
|
||||||
{
|
{
|
||||||
g_set_error_literal (error,
|
g_set_error_literal (error,
|
||||||
G_IO_ERROR,
|
G_IO_ERROR,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user