mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
broadway: Define variables where they are used
Avoids gcc warnings about unused variables.
This commit is contained in:
parent
9708ecdd5b
commit
a2ac9524bc
@ -416,7 +416,6 @@ main (int argc, char *argv[])
|
||||
GInetAddress *inet;
|
||||
GSocketAddress *address;
|
||||
GSocketService *listener;
|
||||
char *path, *basename;
|
||||
char *http_address = NULL;
|
||||
char *unixsocket_address = NULL;
|
||||
int http_port = 0;
|
||||
@ -478,6 +477,8 @@ main (int argc, char *argv[])
|
||||
#ifdef G_OS_UNIX
|
||||
else if (display[0] == ':' && g_ascii_isdigit(display[1]))
|
||||
{
|
||||
char *path, *basename;
|
||||
|
||||
port = strtol (display + strlen (":"), NULL, 10);
|
||||
basename = g_strdup_printf ("broadway%d.socket", port + 1);
|
||||
path = g_build_filename (g_get_user_runtime_dir (), basename, NULL);
|
||||
|
@ -95,7 +95,6 @@ GdkBroadwayServer *
|
||||
_gdk_broadway_server_new (const char *display, GError **error)
|
||||
{
|
||||
GdkBroadwayServer *server;
|
||||
char *basename;
|
||||
GSocketClient *client;
|
||||
GSocketConnection *connection;
|
||||
GInetAddress *inet;
|
||||
@ -103,7 +102,6 @@ _gdk_broadway_server_new (const char *display, GError **error)
|
||||
GPollableInputStream *pollable;
|
||||
GInputStream *in;
|
||||
GSource *source;
|
||||
char *path;
|
||||
char *local_socket_type = NULL;
|
||||
int port;
|
||||
|
||||
@ -128,6 +126,8 @@ _gdk_broadway_server_new (const char *display, GError **error)
|
||||
#ifdef G_OS_UNIX
|
||||
else if (display[0] == ':' && g_ascii_isdigit(display[1]))
|
||||
{
|
||||
char *path, *basename;
|
||||
|
||||
port = strtol (display + strlen (":"), NULL, 10);
|
||||
basename = g_strdup_printf ("broadway%d.socket", port + 1);
|
||||
path = g_build_filename (g_get_user_runtime_dir (), basename, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user