mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-25 21:46:14 +01:00
Merge branch 'cleanup-warnings-split-8' into 'main'
Cleanup warnings split 8 See merge request GNOME/glib!2497
This commit is contained in:
commit
6c31ef6f18
@ -545,12 +545,12 @@ g_dbus_connection_export_action_group (GDBusConnection *connection,
|
|||||||
|
|
||||||
if G_UNLIKELY (org_gtk_Actions == NULL)
|
if G_UNLIKELY (org_gtk_Actions == NULL)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *my_error = NULL;
|
||||||
GDBusNodeInfo *info;
|
GDBusNodeInfo *info;
|
||||||
|
|
||||||
info = g_dbus_node_info_new_for_xml (org_gtk_Actions_xml, &error);
|
info = g_dbus_node_info_new_for_xml (org_gtk_Actions_xml, &my_error);
|
||||||
if G_UNLIKELY (info == NULL)
|
if G_UNLIKELY (info == NULL)
|
||||||
g_error ("%s", error->message);
|
g_error ("%s", my_error->message);
|
||||||
org_gtk_Actions = g_dbus_node_info_lookup_interface (info, "org.gtk.Actions");
|
org_gtk_Actions = g_dbus_node_info_lookup_interface (info, "org.gtk.Actions");
|
||||||
g_assert (org_gtk_Actions != NULL);
|
g_assert (org_gtk_Actions != NULL);
|
||||||
g_dbus_interface_info_ref (org_gtk_Actions);
|
g_dbus_interface_info_ref (org_gtk_Actions);
|
||||||
|
@ -376,20 +376,20 @@ g_application_impl_attempt_primary (GApplicationImpl *impl,
|
|||||||
|
|
||||||
if (org_gtk_Application == NULL)
|
if (org_gtk_Application == NULL)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *my_error = NULL;
|
||||||
GDBusNodeInfo *info;
|
GDBusNodeInfo *info;
|
||||||
|
|
||||||
info = g_dbus_node_info_new_for_xml (org_gtk_Application_xml, &error);
|
info = g_dbus_node_info_new_for_xml (org_gtk_Application_xml, &my_error);
|
||||||
if G_UNLIKELY (info == NULL)
|
if G_UNLIKELY (info == NULL)
|
||||||
g_error ("%s", error->message);
|
g_error ("%s", my_error->message);
|
||||||
org_gtk_Application = g_dbus_node_info_lookup_interface (info, "org.gtk.Application");
|
org_gtk_Application = g_dbus_node_info_lookup_interface (info, "org.gtk.Application");
|
||||||
g_assert (org_gtk_Application != NULL);
|
g_assert (org_gtk_Application != NULL);
|
||||||
g_dbus_interface_info_ref (org_gtk_Application);
|
g_dbus_interface_info_ref (org_gtk_Application);
|
||||||
g_dbus_node_info_unref (info);
|
g_dbus_node_info_unref (info);
|
||||||
|
|
||||||
info = g_dbus_node_info_new_for_xml (org_freedesktop_Application_xml, &error);
|
info = g_dbus_node_info_new_for_xml (org_freedesktop_Application_xml, &my_error);
|
||||||
if G_UNLIKELY (info == NULL)
|
if G_UNLIKELY (info == NULL)
|
||||||
g_error ("%s", error->message);
|
g_error ("%s", my_error->message);
|
||||||
org_freedesktop_Application = g_dbus_node_info_lookup_interface (info, "org.freedesktop.Application");
|
org_freedesktop_Application = g_dbus_node_info_lookup_interface (info, "org.freedesktop.Application");
|
||||||
g_assert (org_freedesktop_Application != NULL);
|
g_assert (org_freedesktop_Application != NULL);
|
||||||
g_dbus_interface_info_ref (org_freedesktop_Application);
|
g_dbus_interface_info_ref (org_freedesktop_Application);
|
||||||
|
@ -1248,19 +1248,19 @@ handle_call (gint *argc,
|
|||||||
{
|
{
|
||||||
if (in_signature_types->len > 0)
|
if (in_signature_types->len > 0)
|
||||||
{
|
{
|
||||||
GString *s;
|
GString *str;
|
||||||
s = g_string_new (NULL);
|
str = g_string_new (NULL);
|
||||||
|
|
||||||
for (n = 0; n < in_signature_types->len; n++)
|
for (n = 0; n < in_signature_types->len; n++)
|
||||||
{
|
{
|
||||||
GVariantType *type = in_signature_types->pdata[n];
|
GVariantType *type = in_signature_types->pdata[n];
|
||||||
g_string_append_len (s,
|
g_string_append_len (str,
|
||||||
g_variant_type_peek_string (type),
|
g_variant_type_peek_string (type),
|
||||||
g_variant_type_get_string_length (type));
|
g_variant_type_get_string_length (type));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_printerr ("(According to introspection data, you need to pass '%s')\n", s->str);
|
g_printerr ("(According to introspection data, you need to pass '%s')\n", str->str);
|
||||||
g_string_free (s, TRUE);
|
g_string_free (str, TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_printerr ("(According to introspection data, you need to pass no arguments)\n");
|
g_printerr ("(According to introspection data, you need to pass no arguments)\n");
|
||||||
@ -1532,7 +1532,6 @@ dump_interface (GDBusConnection *c,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
guint n;
|
|
||||||
for (n = 0; o->properties != NULL && o->properties[n] != NULL; n++)
|
for (n = 0; o->properties != NULL && o->properties[n] != NULL; n++)
|
||||||
{
|
{
|
||||||
result = g_dbus_connection_call_sync (c,
|
result = g_dbus_connection_call_sync (c,
|
||||||
|
@ -461,7 +461,6 @@ client_choose_mech_and_send_initial_response (GDBusAuth *auth,
|
|||||||
|
|
||||||
if (auth_mech_to_use_gtype == (GType) 0)
|
if (auth_mech_to_use_gtype == (GType) 0)
|
||||||
{
|
{
|
||||||
guint n;
|
|
||||||
gchar *available;
|
gchar *available;
|
||||||
GString *tried_str;
|
GString *tried_str;
|
||||||
|
|
||||||
|
@ -681,7 +681,7 @@ keyring_generate_entry (const gchar *cookie_context,
|
|||||||
gchar *keyring_dir;
|
gchar *keyring_dir;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
gchar *contents;
|
gchar *contents;
|
||||||
GError *local_error;
|
GError *local_error = NULL;
|
||||||
gchar **lines;
|
gchar **lines;
|
||||||
gint max_line_id;
|
gint max_line_id;
|
||||||
GString *new_contents;
|
GString *new_contents;
|
||||||
@ -717,7 +717,6 @@ keyring_generate_entry (const gchar *cookie_context,
|
|||||||
if (lock_fd == -1)
|
if (lock_fd == -1)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
local_error = NULL;
|
|
||||||
contents = NULL;
|
contents = NULL;
|
||||||
if (!g_file_get_contents (path,
|
if (!g_file_get_contents (path,
|
||||||
&contents,
|
&contents,
|
||||||
@ -727,12 +726,12 @@ keyring_generate_entry (const gchar *cookie_context,
|
|||||||
if (local_error->domain == G_FILE_ERROR && local_error->code == G_FILE_ERROR_NOENT)
|
if (local_error->domain == G_FILE_ERROR && local_error->code == G_FILE_ERROR_NOENT)
|
||||||
{
|
{
|
||||||
/* file doesn't have to exist */
|
/* file doesn't have to exist */
|
||||||
g_error_free (local_error);
|
g_clear_error (&local_error);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_propagate_prefixed_error (error,
|
g_propagate_prefixed_error (error,
|
||||||
local_error,
|
g_steal_pointer (&local_error),
|
||||||
_("Error opening keyring “%s” for writing: "),
|
_("Error opening keyring “%s” for writing: "),
|
||||||
path);
|
path);
|
||||||
goto out;
|
goto out;
|
||||||
@ -911,11 +910,11 @@ keyring_generate_entry (const gchar *cookie_context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
/* Any error should have been propagated to @error by now */
|
||||||
|
g_assert (local_error == NULL);
|
||||||
|
|
||||||
if (lock_fd != -1)
|
if (lock_fd != -1)
|
||||||
{
|
{
|
||||||
GError *local_error;
|
|
||||||
local_error = NULL;
|
|
||||||
if (!keyring_release_lock (path, lock_fd, &local_error))
|
if (!keyring_release_lock (path, lock_fd, &local_error))
|
||||||
{
|
{
|
||||||
if (error != NULL)
|
if (error != NULL)
|
||||||
|
@ -5961,11 +5961,11 @@ g_dbus_connection_call_internal (GDBusConnection *connection,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GDBusMessageFlags flags;
|
GDBusMessageFlags msg_flags;
|
||||||
|
|
||||||
flags = g_dbus_message_get_flags (message);
|
msg_flags = g_dbus_message_get_flags (message);
|
||||||
flags |= G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED;
|
msg_flags |= G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED;
|
||||||
g_dbus_message_set_flags (message, flags);
|
g_dbus_message_set_flags (message, msg_flags);
|
||||||
|
|
||||||
g_dbus_connection_send_message (connection,
|
g_dbus_connection_send_message (connection,
|
||||||
message,
|
message,
|
||||||
|
@ -257,7 +257,7 @@ main (int argc,
|
|||||||
GIOStream *connection;
|
GIOStream *connection;
|
||||||
GInputStream *istream;
|
GInputStream *istream;
|
||||||
GOutputStream *ostream;
|
GOutputStream *ostream;
|
||||||
GSocketAddress *src_address;
|
GSocketAddress *src_address = NULL;
|
||||||
GTlsCertificate *certificate = NULL;
|
GTlsCertificate *certificate = NULL;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
GMainLoop *loop;
|
GMainLoop *loop;
|
||||||
|
|
||||||
int port = 7777;
|
int default_port = 7777;
|
||||||
gboolean verbose = FALSE;
|
gboolean verbose = FALSE;
|
||||||
gboolean dont_reuse_address = FALSE;
|
gboolean dont_reuse_address = FALSE;
|
||||||
gboolean non_blocking = FALSE;
|
gboolean non_blocking = FALSE;
|
||||||
@ -18,7 +18,7 @@ gboolean unix_socket = FALSE;
|
|||||||
const char *tls_cert_file = NULL;
|
const char *tls_cert_file = NULL;
|
||||||
|
|
||||||
static GOptionEntry cmd_entries[] = {
|
static GOptionEntry cmd_entries[] = {
|
||||||
{"port", 'p', 0, G_OPTION_ARG_INT, &port,
|
{"port", 'p', 0, G_OPTION_ARG_INT, &default_port,
|
||||||
"Local port to bind to", NULL},
|
"Local port to bind to", NULL},
|
||||||
{"cancel", 'c', 0, G_OPTION_ARG_INT, &cancel_timeout,
|
{"cancel", 'c', 0, G_OPTION_ARG_INT, &cancel_timeout,
|
||||||
"Cancel any op after the specified amount of seconds", NULL},
|
"Cancel any op after the specified amount of seconds", NULL},
|
||||||
@ -51,7 +51,7 @@ main (int argc,
|
|||||||
{
|
{
|
||||||
GSocket *socket, *new_socket, *recv_socket;
|
GSocket *socket, *new_socket, *recv_socket;
|
||||||
GSocketAddress *src_address;
|
GSocketAddress *src_address;
|
||||||
GSocketAddress *address;
|
GSocketAddress *address = NULL;
|
||||||
GSocketType socket_type;
|
GSocketType socket_type;
|
||||||
GSocketFamily socket_family;
|
GSocketFamily socket_family;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
@ -140,7 +140,7 @@ main (int argc,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
src_address = g_inet_socket_address_new (g_inet_address_new_any (G_SOCKET_FAMILY_IPV4), port);
|
src_address = g_inet_socket_address_new (g_inet_address_new_any (G_SOCKET_FAMILY_IPV4), default_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_socket_bind (socket, src_address, !dont_reuse_address, &error))
|
if (!g_socket_bind (socket, src_address, !dont_reuse_address, &error))
|
||||||
|
@ -1203,7 +1203,7 @@ duplicate_fd (int fd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int)newfd;
|
return (int)(gintptr)newfd;
|
||||||
#else
|
#else
|
||||||
return dup (fd);
|
return dup (fd);
|
||||||
#endif
|
#endif
|
||||||
|
@ -246,12 +246,12 @@ check_expected_events (RecordedEvent *expected,
|
|||||||
* error messages. Print the expected and actual events first. */
|
* error messages. Print the expected and actual events first. */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GList *l;
|
GList *ll;
|
||||||
gsize j;
|
gsize j;
|
||||||
|
|
||||||
g_test_message ("Recorded events:");
|
g_test_message ("Recorded events:");
|
||||||
for (l = recorded; l != NULL; l = l->next)
|
for (ll = recorded; ll != NULL; ll = ll->next)
|
||||||
output_event ((RecordedEvent *) l->data);
|
output_event ((RecordedEvent *) ll->data);
|
||||||
|
|
||||||
g_test_message ("Expected events:");
|
g_test_message ("Expected events:");
|
||||||
for (j = 0; j < n_expected; j++)
|
for (j = 0; j < n_expected; j++)
|
||||||
|
Loading…
Reference in New Issue
Block a user