aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-04-12 21:42:30 -0500
committerTed Gould <ted@canonical.com>2009-04-12 21:42:30 -0500
commite9ef5ec77b72c9bf518e4cdda96e941421daa985 (patch)
treef6264e126bd112f8bd20f467f0e47018ce8a16b1
parent551a97c20a93b8f1046fe1c1551d036fb0164aa9 (diff)
parenta09510f6cb416fed7e98ce7df61d74f56d7a1bff (diff)
downloadlibayatana-indicator-e9ef5ec77b72c9bf518e4cdda96e941421daa985.tar.gz
libayatana-indicator-e9ef5ec77b72c9bf518e4cdda96e941421daa985.tar.bz2
libayatana-indicator-e9ef5ec77b72c9bf518e4cdda96e941421daa985.zip
Some slight code cleanups to remove warnings
-rw-r--r--libindicate/indicator.c8
-rw-r--r--libindicate/listener.c4
-rw-r--r--libindicate/server.c9
3 files changed, 12 insertions, 9 deletions
diff --git a/libindicate/indicator.c b/libindicate/indicator.c
index 9427d03..7e0c986 100644
--- a/libindicate/indicator.c
+++ b/libindicate/indicator.c
@@ -261,7 +261,7 @@ indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar
return;
}
- gchar * prop_str = g_base64_encode(png_data, png_data_len);
+ gchar * prop_str = g_base64_encode((guchar *)png_data, png_data_len);
indicate_indicator_set_property(indicator, key, prop_str);
g_free(prop_str);
@@ -308,7 +308,7 @@ set_property (IndicateIndicator * indicator, const gchar * key, const gchar * da
{
g_return_if_fail(INDICATE_IS_INDICATOR(indicator));
- if (key != NULL && !strcmp(key, "type")) {
+ if (key != NULL && !g_strcmp0(key, "type")) {
g_warning("Trying to set the 'type' of an indicator which should be done through subclassing.");
return;
}
@@ -316,7 +316,7 @@ set_property (IndicateIndicator * indicator, const gchar * key, const gchar * da
IndicateIndicatorPrivate * priv = INDICATE_INDICATOR_GET_PRIVATE(indicator);
gchar * current = g_hash_table_lookup(priv->properties, key);
- if (current == NULL || strcmp(current, data)) {
+ if (current == NULL || g_strcmp0(current, data)) {
/* If the value has changed or there is no value */
gchar * newkey = g_strdup(key);
/* g_debug("What is newkey? %s", newkey); */
@@ -335,7 +335,7 @@ get_property (IndicateIndicator * indicator, const gchar * key)
{
g_return_val_if_fail(INDICATE_IS_INDICATOR(indicator), NULL);
- if (key != NULL && !strcmp(key, "type")) {
+ if (key != NULL && !g_strcmp0(key, "type")) {
return indicate_indicator_get_indicator_type(indicator);
}
diff --git a/libindicate/listener.c b/libindicate/listener.c
index 0646e81..d181a5e 100644
--- a/libindicate/listener.c
+++ b/libindicate/listener.c
@@ -272,7 +272,7 @@ indicate_listener_init (IndicateListener * listener)
static void
indicate_listener_finalize (GObject * obj)
{
- IndicateListener * listener = INDICATE_LISTENER(obj);
+ /* IndicateListener * listener = INDICATE_LISTENER(obj); */
return;
}
@@ -833,7 +833,7 @@ gboolean
_indicate_listener_get_indicator_servers (IndicateListener * listener, GList * servers)
{
-
+ return TRUE;
}
static void
diff --git a/libindicate/server.c b/libindicate/server.c
index 1378a0d..1f574c1 100644
--- a/libindicate/server.c
+++ b/libindicate/server.c
@@ -307,6 +307,9 @@ set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec)
g_return_if_fail(id == PROP_DESKTOP || id == PROP_TYPE);
gchar ** outstr;
+ gchar * tempstr = NULL;
+ outstr = &tempstr;
+
IndicateServerPrivate * priv = INDICATE_SERVER_GET_PRIVATE(obj);
switch (id) {
case PROP_DESKTOP:
@@ -331,7 +334,7 @@ get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec)
{
g_return_if_fail(id == PROP_DESKTOP || id == PROP_TYPE);
- gchar * outstr;
+ gchar * outstr = NULL;
IndicateServerPrivate * priv = INDICATE_SERVER_GET_PRIVATE(obj);
switch (id) {
case PROP_DESKTOP:
@@ -743,7 +746,7 @@ count_by_type (IndicateIndicator * indicator, count_by_t * cbt)
if (type == NULL && cbt->type == NULL) {
cbt->count++;
} else if (type == NULL || cbt->type == NULL) {
- } else if (!strcmp(type, cbt->type)) {
+ } else if (!g_strcmp0(type, cbt->type)) {
cbt->count++;
}
@@ -826,7 +829,7 @@ get_indicator_list_by_type (IndicateServer * server, gchar * type, GArray ** ind
if (type == NULL && itype == NULL) {
g_array_insert_val(*indicators, i++, id);
} else if (type == NULL || itype == NULL) {
- } else if (!strcmp(type, itype)) {
+ } else if (!g_strcmp0(type, itype)) {
g_array_insert_val(*indicators, i++, id);
}
}