aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/crypt.c2
-rw-r--r--src/defines.h2
-rw-r--r--src/main.c18
-rw-r--r--src/uccs-server.c10
5 files changed, 21 insertions, 15 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 6270105..d09828a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,6 +22,8 @@ libgenerated_la_SOURCES = \
remote-logon.h \
$(NULL)
+# no -Werror here...
+# The generation tools might lag behind the GNU C compiler's sensitivity
libgenerated_la_CFLAGS = \
$(SERVICE_CFLAGS) \
$(NULL)
@@ -57,6 +59,7 @@ libservers_la_SOURCES = \
libservers_la_CFLAGS = \
-DUCCS_QUERY_TOOL="\"remote-logon-config-agent\"" \
+ -Werror \
$(SERVICE_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
@@ -71,6 +74,7 @@ libservers_la_LDFLAGS = \
remote_logon_service_CFLAGS = \
-DDEFAULT_CONFIG_FILE="\"$(sysconfdir)/remote-logon-service.conf\"" \
+ -Werror \
$(SERVICE_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
diff --git a/src/crypt.c b/src/crypt.c
index 146aa7e..defc958 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -91,7 +91,7 @@ do_aes_encrypt(const gchar *origBuffer, const gchar * password, size_t *outBuffe
const size_t bufferLength = ceil((double)origBufferLength / blkLength) * blkLength;
gchar *buffer = malloc(bufferLength);
memcpy(buffer, origBuffer, origBufferLength);
- int i;
+ size_t i;
for (i = origBufferLength; i < bufferLength; ++i)
buffer[i] = 0;
diff --git a/src/defines.h b/src/defines.h
index 08314e3..0008acc 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -21,6 +21,8 @@
#ifndef __DEFINES_H__
#define __DEFINES_H__
+#define RLS_UNUSED __attribute__((unused))
+
/* required UCCS API version */
#define UCCS_API_VERSION "5"
diff --git a/src/main.c b/src/main.c
index 9a17576..91452cb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -63,7 +63,7 @@ error_domain (void)
/* When one of the state changes on the server emit that so that everone knows there
might be a new server available. */
static void
-server_status_updated (Server * server, ServerState newstate, RemoteLogon * rl)
+server_status_updated (Server RLS_UNUSED *server, ServerState newstate, RemoteLogon *rl)
{
GVariant * array = NULL;
@@ -88,7 +88,7 @@ server_status_updated (Server * server, ServerState newstate, RemoteLogon * rl)
/* Looks for the config file and does some basic parsing to pull out the UCCS servers
that are configured in it */
static void
-find_config_file (GKeyFile * parsed, const gchar * cmnd_line, RemoteLogon * rl)
+find_config_file (GKeyFile *parsed, const gchar *cmnd_line, RemoteLogon *rl)
{
GError * error = NULL;
const gchar * file = DEFAULT_CONFIG_FILE;
@@ -138,7 +138,7 @@ find_config_file (GKeyFile * parsed, const gchar * cmnd_line, RemoteLogon * rl)
}
gint
-server_list_to_array (GVariantBuilder * builder, GList * items)
+server_list_to_array (GVariantBuilder *builder, GList *items)
{
gint servercnt = 0;
GList * head = NULL;
@@ -159,7 +159,7 @@ server_list_to_array (GVariantBuilder * builder, GList * items)
}
static gboolean
-handle_get_servers (RemoteLogon * rl, GDBusMethodInvocation * invocation, gpointer user_data)
+handle_get_servers (RemoteLogon RLS_UNUSED *rl, GDBusMethodInvocation * invocation, gpointer RLS_UNUSED user_data)
{
GVariant * array = NULL;
@@ -207,7 +207,7 @@ handle_get_servers_login_cb (UccsServer * server, gboolean unlocked, gpointer us
/* Handle the GetServerForLogin DBus call */
static gboolean
-handle_get_servers_login (RemoteLogon * rl, GDBusMethodInvocation * invocation, gpointer user_data)
+handle_get_servers_login (RemoteLogon RLS_UNUSED *rl, GDBusMethodInvocation *invocation, gpointer RLS_UNUSED user_data)
{
GVariant * params = g_dbus_method_invocation_get_parameters(invocation);
const gchar * sender = g_dbus_method_invocation_get_sender(invocation);
@@ -272,7 +272,7 @@ handle_get_servers_login (RemoteLogon * rl, GDBusMethodInvocation * invocation,
/* Look through a list of servers to see if one matches a URL */
static Server *
-handle_get_domains_list_helper (GList * list, const gchar * uri)
+handle_get_domains_list_helper (GList *list, const gchar *uri)
{
if (list == NULL) return NULL;
@@ -293,7 +293,7 @@ handle_get_domains_list_helper (GList * list, const gchar * uri)
/* Get the cached domains for a server */
static gboolean
-handle_get_domains (RemoteLogon * rl, GDBusMethodInvocation * invocation, gpointer user_data)
+handle_get_domains (RemoteLogon RLS_UNUSED *rl, GDBusMethodInvocation *invocation, gpointer RLS_UNUSED user_data)
{
GVariant * params = g_dbus_method_invocation_get_parameters(invocation);
@@ -331,7 +331,7 @@ handle_get_domains (RemoteLogon * rl, GDBusMethodInvocation * invocation, gpoint
/* Set a given server as last used */
static gboolean
-handle_set_last_used_server (RemoteLogon * rl, GDBusMethodInvocation * invocation, gpointer user_data)
+handle_set_last_used_server (RemoteLogon RLS_UNUSED * rl, GDBusMethodInvocation * invocation, gpointer RLS_UNUSED user_data)
{
GVariant * params = g_dbus_method_invocation_get_parameters(invocation);
@@ -376,7 +376,7 @@ handle_set_last_used_server (RemoteLogon * rl, GDBusMethodInvocation * invocatio
/* If we loose the name, tell the world and there's not much we can do */
static void
-name_lost (GDBusConnection * connection, const gchar * name, gpointer user_data)
+name_lost (GDBusConnection RLS_UNUSED * connection, const gchar * name, gpointer user_data)
{
GMainLoop * mainloop = (GMainLoop *)user_data;
diff --git a/src/uccs-server.c b/src/uccs-server.c
index fda6494..8f8a795 100644
--- a/src/uccs-server.c
+++ b/src/uccs-server.c
@@ -174,7 +174,7 @@ struct _hash_helper {
/* GHashTable foreach item */
static gboolean
-clear_hash_helper (gpointer key, gpointer value, gpointer user_data)
+clear_hash_helper (gpointer key, gpointer RLS_UNUSED value, gpointer user_data)
{
struct _hash_helper * helper = (struct _hash_helper *)user_data;
GError * error = NULL;
@@ -303,7 +303,7 @@ uccs_server_finalize (GObject *object)
/* Callback from the message getting complete */
static void
-verify_server_cb (SoupSession * session, SoupMessage * message, gpointer user_data)
+verify_server_cb (SoupSession RLS_UNUSED *session, SoupMessage *message, gpointer user_data)
{
UccsServer * server = UCCS_SERVER(user_data);
guint statuscode = 404;
@@ -341,7 +341,7 @@ verify_server (UccsServer * server)
/* Callback for when the Network Manger state changes */
static void
-nm_state_changed (NMClient *client, const GParamSpec *pspec, gpointer user_data)
+nm_state_changed (NMClient RLS_UNUSED *client, const GParamSpec RLS_UNUSED *pspec, gpointer user_data)
{
g_return_if_fail(IS_UCCS_SERVER(user_data));
UccsServer * server = UCCS_SERVER(user_data);
@@ -368,7 +368,7 @@ nm_state_changed (NMClient *client, const GParamSpec *pspec, gpointer user_data)
/* Get the properties that can be sent by the greeter for this server */
static GVariant *
-get_properties (Server * server)
+get_properties (Server RLS_UNUSED *server)
{
GVariantBuilder propbuilder;
g_variant_builder_init(&propbuilder, G_VARIANT_TYPE_ARRAY);
@@ -472,7 +472,7 @@ parse_rds_array (UccsServer * server, JsonArray * array)
g_list_free_full(server->subservers, g_object_unref);
server->subservers = NULL;
- int i;
+ guint i;
for (i = 0; i < json_array_get_length(array); i++) {
JsonNode * node = json_array_get_element(array, i);