mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16: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)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GError *my_error = NULL;
|
||||
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)
|
||||
g_error ("%s", error->message);
|
||||
g_error ("%s", my_error->message);
|
||||
org_gtk_Actions = g_dbus_node_info_lookup_interface (info, "org.gtk.Actions");
|
||||
g_assert (org_gtk_Actions != NULL);
|
||||
g_dbus_interface_info_ref (org_gtk_Actions);
|
||||
|
@ -376,20 +376,20 @@ g_application_impl_attempt_primary (GApplicationImpl *impl,
|
||||
|
||||
if (org_gtk_Application == NULL)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GError *my_error = NULL;
|
||||
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)
|
||||
g_error ("%s", error->message);
|
||||
g_error ("%s", my_error->message);
|
||||
org_gtk_Application = g_dbus_node_info_lookup_interface (info, "org.gtk.Application");
|
||||
g_assert (org_gtk_Application != NULL);
|
||||
g_dbus_interface_info_ref (org_gtk_Application);
|
||||
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)
|
||||
g_error ("%s", error->message);
|
||||
g_error ("%s", my_error->message);
|
||||
org_freedesktop_Application = g_dbus_node_info_lookup_interface (info, "org.freedesktop.Application");
|
||||
g_assert (org_freedesktop_Application != NULL);
|
||||
g_dbus_interface_info_ref (org_freedesktop_Application);
|
||||
|
@ -1248,19 +1248,19 @@ handle_call (gint *argc,
|
||||
{
|
||||
if (in_signature_types->len > 0)
|
||||
{
|
||||
GString *s;
|
||||
s = g_string_new (NULL);
|
||||
GString *str;
|
||||
str = g_string_new (NULL);
|
||||
|
||||
for (n = 0; n < in_signature_types->len; 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_get_string_length (type));
|
||||
}
|
||||
|
||||
g_printerr ("(According to introspection data, you need to pass '%s')\n", s->str);
|
||||
g_string_free (s, TRUE);
|
||||
g_printerr ("(According to introspection data, you need to pass '%s')\n", str->str);
|
||||
g_string_free (str, TRUE);
|
||||
}
|
||||
else
|
||||
g_printerr ("(According to introspection data, you need to pass no arguments)\n");
|
||||
@ -1532,7 +1532,6 @@ dump_interface (GDBusConnection *c,
|
||||
}
|
||||
else
|
||||
{
|
||||
guint n;
|
||||
for (n = 0; o->properties != NULL && o->properties[n] != NULL; n++)
|
||||
{
|
||||
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)
|
||||
{
|
||||
guint n;
|
||||
gchar *available;
|
||||
GString *tried_str;
|
||||
|
||||
|
@ -681,7 +681,7 @@ keyring_generate_entry (const gchar *cookie_context,
|
||||
gchar *keyring_dir;
|
||||
gchar *path;
|
||||
gchar *contents;
|
||||
GError *local_error;
|
||||
GError *local_error = NULL;
|
||||
gchar **lines;
|
||||
gint max_line_id;
|
||||
GString *new_contents;
|
||||
@ -717,7 +717,6 @@ keyring_generate_entry (const gchar *cookie_context,
|
||||
if (lock_fd == -1)
|
||||
goto out;
|
||||
|
||||
local_error = NULL;
|
||||
contents = NULL;
|
||||
if (!g_file_get_contents (path,
|
||||
&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)
|
||||
{
|
||||
/* file doesn't have to exist */
|
||||
g_error_free (local_error);
|
||||
g_clear_error (&local_error);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_propagate_prefixed_error (error,
|
||||
local_error,
|
||||
g_steal_pointer (&local_error),
|
||||
_("Error opening keyring “%s” for writing: "),
|
||||
path);
|
||||
goto out;
|
||||
@ -911,11 +910,11 @@ keyring_generate_entry (const gchar *cookie_context,
|
||||
}
|
||||
|
||||
out:
|
||||
/* Any error should have been propagated to @error by now */
|
||||
g_assert (local_error == NULL);
|
||||
|
||||
if (lock_fd != -1)
|
||||
{
|
||||
GError *local_error;
|
||||
local_error = NULL;
|
||||
if (!keyring_release_lock (path, lock_fd, &local_error))
|
||||
{
|
||||
if (error != NULL)
|
||||
|
@ -5961,11 +5961,11 @@ g_dbus_connection_call_internal (GDBusConnection *connection,
|
||||
}
|
||||
else
|
||||
{
|
||||
GDBusMessageFlags flags;
|
||||
GDBusMessageFlags msg_flags;
|
||||
|
||||
flags = g_dbus_message_get_flags (message);
|
||||
flags |= G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED;
|
||||
g_dbus_message_set_flags (message, flags);
|
||||
msg_flags = g_dbus_message_get_flags (message);
|
||||
msg_flags |= G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED;
|
||||
g_dbus_message_set_flags (message, msg_flags);
|
||||
|
||||
g_dbus_connection_send_message (connection,
|
||||
message,
|
||||
|
@ -257,7 +257,7 @@ main (int argc,
|
||||
GIOStream *connection;
|
||||
GInputStream *istream;
|
||||
GOutputStream *ostream;
|
||||
GSocketAddress *src_address;
|
||||
GSocketAddress *src_address = NULL;
|
||||
GTlsCertificate *certificate = NULL;
|
||||
gint i;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
GMainLoop *loop;
|
||||
|
||||
int port = 7777;
|
||||
int default_port = 7777;
|
||||
gboolean verbose = FALSE;
|
||||
gboolean dont_reuse_address = FALSE;
|
||||
gboolean non_blocking = FALSE;
|
||||
@ -18,7 +18,7 @@ gboolean unix_socket = FALSE;
|
||||
const char *tls_cert_file = NULL;
|
||||
|
||||
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},
|
||||
{"cancel", 'c', 0, G_OPTION_ARG_INT, &cancel_timeout,
|
||||
"Cancel any op after the specified amount of seconds", NULL},
|
||||
@ -51,7 +51,7 @@ main (int argc,
|
||||
{
|
||||
GSocket *socket, *new_socket, *recv_socket;
|
||||
GSocketAddress *src_address;
|
||||
GSocketAddress *address;
|
||||
GSocketAddress *address = NULL;
|
||||
GSocketType socket_type;
|
||||
GSocketFamily socket_family;
|
||||
GError *error = NULL;
|
||||
@ -140,7 +140,7 @@ main (int argc,
|
||||
}
|
||||
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))
|
||||
|
@ -1203,7 +1203,7 @@ duplicate_fd (int fd)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (int)newfd;
|
||||
return (int)(gintptr)newfd;
|
||||
#else
|
||||
return dup (fd);
|
||||
#endif
|
||||
|
@ -246,12 +246,12 @@ check_expected_events (RecordedEvent *expected,
|
||||
* error messages. Print the expected and actual events first. */
|
||||
else
|
||||
{
|
||||
GList *l;
|
||||
GList *ll;
|
||||
gsize j;
|
||||
|
||||
g_test_message ("Recorded events:");
|
||||
for (l = recorded; l != NULL; l = l->next)
|
||||
output_event ((RecordedEvent *) l->data);
|
||||
for (ll = recorded; ll != NULL; ll = ll->next)
|
||||
output_event ((RecordedEvent *) ll->data);
|
||||
|
||||
g_test_message ("Expected events:");
|
||||
for (j = 0; j < n_expected; j++)
|
||||
|
Loading…
Reference in New Issue
Block a user