Merge branch 'cleanup-warnings-split-9' into 'main'

Cleanup warnings split 9

See merge request GNOME/glib!2498
This commit is contained in:
Philip Withnall 2022-04-05 11:19:51 +00:00
commit 14717e4f41
7 changed files with 20 additions and 30 deletions

View File

@ -1043,17 +1043,17 @@ signal_cb (GDBusConnection *connection,
{
if (g_strcmp0 (signal_name, "PropertiesChanged") == 0)
{
const gchar *interface_name;
const gchar *properties_interface_name;
GVariant *changed_properties;
const gchar **invalidated_properties;
g_variant_get (parameters,
"(&s@a{sv}^a&s)",
&interface_name,
&properties_interface_name,
&changed_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)
{
GVariantIter property_iter;

View File

@ -927,12 +927,12 @@ try_tcp (GDBusServer *server,
bytes_remaining = 16;
while (bytes_remaining > 0)
{
gssize ret;
gssize size;
int errsv;
ret = write (fd, server->nonce + bytes_written, bytes_remaining);
size = write (fd, server->nonce + bytes_written, bytes_remaining);
errsv = errno;
if (ret == -1)
if (size == -1)
{
if (errsv == EINTR)
goto again;
@ -944,8 +944,8 @@ try_tcp (GDBusServer *server,
g_strerror (errsv));
goto out;
}
bytes_written += ret;
bytes_remaining -= ret;
bytes_written += size;
bytes_remaining -= size;
}
if (!g_close (fd, error))
goto out;

View File

@ -110,15 +110,6 @@ static guint signals[LAST_SIGNAL] = {0};
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
accounts_user_init (AccountsUser *user)
{
@ -234,7 +225,6 @@ accounts_user_class_init (AccountsUserClass *klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->get_property = accounts_user_get_property;
gobject_class->finalize = accounts_user_finalize;
proxy_class = G_DBUS_PROXY_CLASS (klass);
proxy_class->g_signal = accounts_user_g_signal;

View File

@ -36,12 +36,12 @@
#error Should have been able to find openpty on GNU/Linux
#endif
GMainLoop *loop;
GPollableInputStream *in;
GOutputStream *out;
static GMainLoop *loop;
static GPollableInputStream *in;
static GOutputStream *out;
static gboolean
poll_source_callback (GPollableInputStream *in,
poll_source_callback (GPollableInputStream *input,
gpointer user_data)
{
GError *error = NULL;
@ -49,13 +49,13 @@ poll_source_callback (GPollableInputStream *in,
gssize nread;
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_cmpint (nread, ==, 2);
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;
return G_SOURCE_REMOVE;

View File

@ -67,9 +67,9 @@ print_and_free_error (GError *error)
}
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)
printf ("\tnone\n");

View File

@ -616,7 +616,7 @@ do_async_connectable (GSocketAddressEnumerator *enumerator)
}
static void
do_connectable (const char *arg, gboolean synchronous, guint count)
do_connectable (const char *arg, gboolean synch, guint count)
{
char **parts;
GSocketConnectable *connectable;
@ -660,7 +660,7 @@ do_connectable (const char *arg, gboolean synchronous, guint count)
{
enumerator = g_socket_connectable_enumerate (connectable);
if (synchronous)
if (synch)
do_sync_connectable (enumerator);
else
do_async_connectable (enumerator);

View File

@ -1384,7 +1384,7 @@ test_year (gconstpointer t)
GDateYear y = GPOINTER_TO_INT (t);
GDateMonth m;
GDateDay day;
guint32 j;
guint32 j = 0;
GDate *d;
gint i;
GDate tmp;