mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Merge branch 'cleanup-warnings-split-8' into 'main'
Cleanup warnings split 8 See merge request GNOME/glib!2497
This commit is contained in:
@@ -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++)
|
||||
|
Reference in New Issue
Block a user