broadway: Define variables where they are used
Avoids gcc warnings about unused variables.
This commit is contained in:
@ -416,7 +416,6 @@ main (int argc, char *argv[])
|
|||||||
GInetAddress *inet;
|
GInetAddress *inet;
|
||||||
GSocketAddress *address;
|
GSocketAddress *address;
|
||||||
GSocketService *listener;
|
GSocketService *listener;
|
||||||
char *path, *basename;
|
|
||||||
char *http_address = NULL;
|
char *http_address = NULL;
|
||||||
char *unixsocket_address = NULL;
|
char *unixsocket_address = NULL;
|
||||||
int http_port = 0;
|
int http_port = 0;
|
||||||
@ -478,6 +477,8 @@ main (int argc, char *argv[])
|
|||||||
#ifdef G_OS_UNIX
|
#ifdef G_OS_UNIX
|
||||||
else if (display[0] == ':' && g_ascii_isdigit(display[1]))
|
else if (display[0] == ':' && g_ascii_isdigit(display[1]))
|
||||||
{
|
{
|
||||||
|
char *path, *basename;
|
||||||
|
|
||||||
port = strtol (display + strlen (":"), NULL, 10);
|
port = strtol (display + strlen (":"), NULL, 10);
|
||||||
basename = g_strdup_printf ("broadway%d.socket", port + 1);
|
basename = g_strdup_printf ("broadway%d.socket", port + 1);
|
||||||
path = g_build_filename (g_get_user_runtime_dir (), basename, NULL);
|
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)
|
_gdk_broadway_server_new (const char *display, GError **error)
|
||||||
{
|
{
|
||||||
GdkBroadwayServer *server;
|
GdkBroadwayServer *server;
|
||||||
char *basename;
|
|
||||||
GSocketClient *client;
|
GSocketClient *client;
|
||||||
GSocketConnection *connection;
|
GSocketConnection *connection;
|
||||||
GInetAddress *inet;
|
GInetAddress *inet;
|
||||||
@ -103,7 +102,6 @@ _gdk_broadway_server_new (const char *display, GError **error)
|
|||||||
GPollableInputStream *pollable;
|
GPollableInputStream *pollable;
|
||||||
GInputStream *in;
|
GInputStream *in;
|
||||||
GSource *source;
|
GSource *source;
|
||||||
char *path;
|
|
||||||
char *local_socket_type = NULL;
|
char *local_socket_type = NULL;
|
||||||
int port;
|
int port;
|
||||||
|
|
||||||
@ -128,6 +126,8 @@ _gdk_broadway_server_new (const char *display, GError **error)
|
|||||||
#ifdef G_OS_UNIX
|
#ifdef G_OS_UNIX
|
||||||
else if (display[0] == ':' && g_ascii_isdigit(display[1]))
|
else if (display[0] == ':' && g_ascii_isdigit(display[1]))
|
||||||
{
|
{
|
||||||
|
char *path, *basename;
|
||||||
|
|
||||||
port = strtol (display + strlen (":"), NULL, 10);
|
port = strtol (display + strlen (":"), NULL, 10);
|
||||||
basename = g_strdup_printf ("broadway%d.socket", port + 1);
|
basename = g_strdup_printf ("broadway%d.socket", port + 1);
|
||||||
path = g_build_filename (g_get_user_runtime_dir (), basename, NULL);
|
path = g_build_filename (g_get_user_runtime_dir (), basename, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user