mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 19:52:10 +01:00
Merge branch 'cleanup-warnings-split-9' into 'main'
Cleanup warnings split 9 See merge request GNOME/glib!2498
This commit is contained in:
commit
14717e4f41
@ -1043,17 +1043,17 @@ signal_cb (GDBusConnection *connection,
|
|||||||
{
|
{
|
||||||
if (g_strcmp0 (signal_name, "PropertiesChanged") == 0)
|
if (g_strcmp0 (signal_name, "PropertiesChanged") == 0)
|
||||||
{
|
{
|
||||||
const gchar *interface_name;
|
const gchar *properties_interface_name;
|
||||||
GVariant *changed_properties;
|
GVariant *changed_properties;
|
||||||
const gchar **invalidated_properties;
|
const gchar **invalidated_properties;
|
||||||
|
|
||||||
g_variant_get (parameters,
|
g_variant_get (parameters,
|
||||||
"(&s@a{sv}^a&s)",
|
"(&s@a{sv}^a&s)",
|
||||||
&interface_name,
|
&properties_interface_name,
|
||||||
&changed_properties,
|
&changed_properties,
|
||||||
&invalidated_properties);
|
&invalidated_properties);
|
||||||
|
|
||||||
interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object_proxy), interface_name);
|
interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object_proxy), properties_interface_name);
|
||||||
if (interface != NULL)
|
if (interface != NULL)
|
||||||
{
|
{
|
||||||
GVariantIter property_iter;
|
GVariantIter property_iter;
|
||||||
|
@ -927,12 +927,12 @@ try_tcp (GDBusServer *server,
|
|||||||
bytes_remaining = 16;
|
bytes_remaining = 16;
|
||||||
while (bytes_remaining > 0)
|
while (bytes_remaining > 0)
|
||||||
{
|
{
|
||||||
gssize ret;
|
gssize size;
|
||||||
int errsv;
|
int errsv;
|
||||||
|
|
||||||
ret = write (fd, server->nonce + bytes_written, bytes_remaining);
|
size = write (fd, server->nonce + bytes_written, bytes_remaining);
|
||||||
errsv = errno;
|
errsv = errno;
|
||||||
if (ret == -1)
|
if (size == -1)
|
||||||
{
|
{
|
||||||
if (errsv == EINTR)
|
if (errsv == EINTR)
|
||||||
goto again;
|
goto again;
|
||||||
@ -944,8 +944,8 @@ try_tcp (GDBusServer *server,
|
|||||||
g_strerror (errsv));
|
g_strerror (errsv));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
bytes_written += ret;
|
bytes_written += size;
|
||||||
bytes_remaining -= ret;
|
bytes_remaining -= size;
|
||||||
}
|
}
|
||||||
if (!g_close (fd, error))
|
if (!g_close (fd, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -110,15 +110,6 @@ static guint signals[LAST_SIGNAL] = {0};
|
|||||||
|
|
||||||
G_DEFINE_TYPE (AccountsUser, accounts_user, G_TYPE_DBUS_PROXY)
|
G_DEFINE_TYPE (AccountsUser, accounts_user, G_TYPE_DBUS_PROXY)
|
||||||
|
|
||||||
static void
|
|
||||||
accounts_user_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
G_GNUC_UNUSED AccountsUser *user = ACCOUNTS_USER (object);
|
|
||||||
|
|
||||||
if (G_OBJECT_CLASS (accounts_user_parent_class)->finalize != NULL)
|
|
||||||
G_OBJECT_CLASS (accounts_user_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
accounts_user_init (AccountsUser *user)
|
accounts_user_init (AccountsUser *user)
|
||||||
{
|
{
|
||||||
@ -234,7 +225,6 @@ accounts_user_class_init (AccountsUserClass *klass)
|
|||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (klass);
|
gobject_class = G_OBJECT_CLASS (klass);
|
||||||
gobject_class->get_property = accounts_user_get_property;
|
gobject_class->get_property = accounts_user_get_property;
|
||||||
gobject_class->finalize = accounts_user_finalize;
|
|
||||||
|
|
||||||
proxy_class = G_DBUS_PROXY_CLASS (klass);
|
proxy_class = G_DBUS_PROXY_CLASS (klass);
|
||||||
proxy_class->g_signal = accounts_user_g_signal;
|
proxy_class->g_signal = accounts_user_g_signal;
|
||||||
|
@ -36,12 +36,12 @@
|
|||||||
#error Should have been able to find openpty on GNU/Linux
|
#error Should have been able to find openpty on GNU/Linux
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GMainLoop *loop;
|
static GMainLoop *loop;
|
||||||
GPollableInputStream *in;
|
static GPollableInputStream *in;
|
||||||
GOutputStream *out;
|
static GOutputStream *out;
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
poll_source_callback (GPollableInputStream *in,
|
poll_source_callback (GPollableInputStream *input,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
@ -49,13 +49,13 @@ poll_source_callback (GPollableInputStream *in,
|
|||||||
gssize nread;
|
gssize nread;
|
||||||
gboolean *success = user_data;
|
gboolean *success = user_data;
|
||||||
|
|
||||||
g_assert_true (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (in)));
|
g_assert_true (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (input)));
|
||||||
|
|
||||||
nread = g_pollable_input_stream_read_nonblocking (in, buf, 2, NULL, &error);
|
nread = g_pollable_input_stream_read_nonblocking (input, buf, 2, NULL, &error);
|
||||||
g_assert_no_error (error);
|
g_assert_no_error (error);
|
||||||
g_assert_cmpint (nread, ==, 2);
|
g_assert_cmpint (nread, ==, 2);
|
||||||
g_assert_cmpstr (buf, ==, "x");
|
g_assert_cmpstr (buf, ==, "x");
|
||||||
g_assert_false (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (in)));
|
g_assert_false (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (input)));
|
||||||
|
|
||||||
*success = TRUE;
|
*success = TRUE;
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
|
@ -67,9 +67,9 @@ print_and_free_error (GError *error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_proxies (const gchar *info, gchar **proxies)
|
print_proxies (const gchar *local_info, gchar **proxies)
|
||||||
{
|
{
|
||||||
printf ("Proxies for URI '%s' are:\n", info);
|
printf ("Proxies for URI '%s' are:\n", local_info);
|
||||||
|
|
||||||
if (proxies == NULL || proxies[0] == NULL)
|
if (proxies == NULL || proxies[0] == NULL)
|
||||||
printf ("\tnone\n");
|
printf ("\tnone\n");
|
||||||
|
@ -616,7 +616,7 @@ do_async_connectable (GSocketAddressEnumerator *enumerator)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_connectable (const char *arg, gboolean synchronous, guint count)
|
do_connectable (const char *arg, gboolean synch, guint count)
|
||||||
{
|
{
|
||||||
char **parts;
|
char **parts;
|
||||||
GSocketConnectable *connectable;
|
GSocketConnectable *connectable;
|
||||||
@ -660,7 +660,7 @@ do_connectable (const char *arg, gboolean synchronous, guint count)
|
|||||||
{
|
{
|
||||||
enumerator = g_socket_connectable_enumerate (connectable);
|
enumerator = g_socket_connectable_enumerate (connectable);
|
||||||
|
|
||||||
if (synchronous)
|
if (synch)
|
||||||
do_sync_connectable (enumerator);
|
do_sync_connectable (enumerator);
|
||||||
else
|
else
|
||||||
do_async_connectable (enumerator);
|
do_async_connectable (enumerator);
|
||||||
|
@ -1384,7 +1384,7 @@ test_year (gconstpointer t)
|
|||||||
GDateYear y = GPOINTER_TO_INT (t);
|
GDateYear y = GPOINTER_TO_INT (t);
|
||||||
GDateMonth m;
|
GDateMonth m;
|
||||||
GDateDay day;
|
GDateDay day;
|
||||||
guint32 j;
|
guint32 j = 0;
|
||||||
GDate *d;
|
GDate *d;
|
||||||
gint i;
|
gint i;
|
||||||
GDate tmp;
|
GDate tmp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user