summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2013-06-18 11:12:27 +1200
committerRobert Ancell <robert.ancell@canonical.com>2013-06-18 11:12:27 +1200
commit190e8dab4139124f457d4258df5f55ecf1e129e0 (patch)
tree275a68d9e20485cc53c053221eb14e93c62779f8
parent925b185c77ab93412fc1fbd6535aca0d8f2a2a96 (diff)
downloadlightdm-git-190e8dab4139124f457d4258df5f55ecf1e129e0.tar.gz
Fix compile warnings
-rw-r--r--liblightdm-gobject/greeter.c2
-rw-r--r--src/accounts.c2
-rw-r--r--src/greeter.c2
-rw-r--r--src/session-child.c2
-rw-r--r--src/xdmcp-server.c2
-rw-r--r--tests/src/X.c10
-rw-r--r--tests/src/Xvnc.c10
-rw-r--r--tests/src/test-runner.c10
8 files changed, 18 insertions, 22 deletions
diff --git a/liblightdm-gobject/greeter.c b/liblightdm-gobject/greeter.c
index 689bd3fc..e8550bf8 100644
--- a/liblightdm-gobject/greeter.c
+++ b/liblightdm-gobject/greeter.c
@@ -119,7 +119,7 @@ timed_login_cb (gpointer data)
}
static guint32
-int_length ()
+int_length (void)
{
return 4;
}
diff --git a/src/accounts.c b/src/accounts.c
index e974c543..af523243 100644
--- a/src/accounts.c
+++ b/src/accounts.c
@@ -154,7 +154,7 @@ get_string_from_dmrc (const gchar *username, const gchar *group,
}
static GDBusProxy *
-get_accounts_service_proxy ()
+get_accounts_service_proxy (void)
{
GError *error = NULL;
diff --git a/src/greeter.c b/src/greeter.c
index 9601c093..60cf8cb2 100644
--- a/src/greeter.c
+++ b/src/greeter.c
@@ -152,7 +152,7 @@ secure_free (Greeter *greeter, void *ptr)
}
static guint32
-int_length ()
+int_length (void)
{
return 4;
}
diff --git a/src/session-child.c b/src/session-child.c
index 23e7ea9e..9325309c 100644
--- a/src/session-child.c
+++ b/src/session-child.c
@@ -89,7 +89,7 @@ read_string_full (void* (*alloc_fn)(size_t n))
}
static gchar *
-read_string ()
+read_string (void)
{
return read_string_full (g_malloc);
}
diff --git a/src/xdmcp-server.c b/src/xdmcp-server.c
index 59a38a65..b92df9c9 100644
--- a/src/xdmcp-server.c
+++ b/src/xdmcp-server.c
@@ -237,7 +237,7 @@ decode_key (const gchar *key, guint8 *data)
{
gint i;
- memset (data, 0, sizeof (data));
+ memset (data, 0, 8);
if (strncmp (key, "0x", 2) == 0 || strncmp (key, "0X", 2) == 0)
{
for (i = 0; i < 8; i++)
diff --git a/tests/src/X.c b/tests/src/X.c
index 86ae768d..dfc41d36 100644
--- a/tests/src/X.c
+++ b/tests/src/X.c
@@ -38,7 +38,7 @@ static guint16 xdmcp_cookie_length = 0;
static guint8 *xdmcp_cookie = NULL;
static void
-cleanup ()
+cleanup (void)
{
if (lock_path)
unlink (lock_path);
@@ -56,7 +56,7 @@ quit (int status)
}
static void
-indicate_ready ()
+indicate_ready (void)
{
void *handler;
handler = signal (SIGUSR1, SIG_IGN);
@@ -192,8 +192,6 @@ main (int argc, char **argv)
{
int i;
char *pid_string;
- gboolean listen_tcp = TRUE;
- gboolean listen_unix = TRUE;
gboolean do_xdmcp = FALSE;
guint xdmcp_port = 0;
gchar *xdmcp_host = NULL;
@@ -230,9 +228,9 @@ main (int argc, char **argv)
char *protocol = argv[i+1];
i++;
if (strcmp (protocol, "tcp") == 0)
- listen_tcp = FALSE;
+ ;//listen_tcp = FALSE;
else if (strcmp (protocol, "unix") == 0)
- listen_unix = FALSE;
+ ;//listen_unix = FALSE;
}
else if (strcmp (arg, "-nr") == 0)
{
diff --git a/tests/src/Xvnc.c b/tests/src/Xvnc.c
index 247c5c6e..fd374191 100644
--- a/tests/src/Xvnc.c
+++ b/tests/src/Xvnc.c
@@ -29,7 +29,7 @@ static int display_number = 0;
static XServer *xserver = NULL;
static void
-indicate_ready ()
+indicate_ready (void)
{
void *handler;
handler = signal (SIGUSR1, SIG_IGN);
@@ -42,7 +42,7 @@ indicate_ready ()
}
static void
-cleanup ()
+cleanup (void)
{
if (lock_path)
unlink (lock_path);
@@ -132,8 +132,6 @@ int
main (int argc, char **argv)
{
char *pid_string;
- gboolean listen_tcp = TRUE;
- gboolean listen_unix = TRUE;
gboolean use_inetd = FALSE;
gboolean has_option = FALSE;
gchar *geometry = g_strdup ("640x480");
@@ -172,9 +170,9 @@ main (int argc, char **argv)
char *protocol = argv[i+1];
i++;
if (strcmp (protocol, "tcp") == 0)
- listen_tcp = FALSE;
+ ;//listen_tcp = FALSE;
else if (strcmp (protocol, "unix") == 0)
- listen_unix = FALSE;
+ ;//listen_unix = FALSE;
}
else if (strcmp (arg, "-geometry") == 0)
{
diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c
index 04919288..0b06d200 100644
--- a/tests/src/test-runner.c
+++ b/tests/src/test-runner.c
@@ -515,7 +515,7 @@ handle_command (const gchar *command)
}
static void
-run_commands ()
+run_commands (void)
{
/* Stop daemon if requested */
while (TRUE)
@@ -890,7 +890,7 @@ ck_name_acquired_cb (GDBusConnection *connection,
}
static void
-start_console_kit_daemon ()
+start_console_kit_daemon (void)
{
service_count++;
g_bus_own_name (G_BUS_TYPE_SYSTEM,
@@ -904,7 +904,7 @@ start_console_kit_daemon ()
}
static void
-load_passwd_file ()
+load_passwd_file (void)
{
gchar *path, *data, **lines;
int i;
@@ -1179,7 +1179,7 @@ accounts_name_acquired_cb (GDBusConnection *connection,
}
static void
-start_accounts_service_daemon ()
+start_accounts_service_daemon (void)
{
service_count++;
g_bus_own_name (G_BUS_TYPE_SYSTEM,
@@ -1193,7 +1193,7 @@ start_accounts_service_daemon ()
}
static void
-run_lightdm ()
+run_lightdm (void)
{
GString *command_line;
gchar **lightdm_argv;