[Xfce4-commits] <xfce4-weather-plugin:master> Silence compiler warnings, remove unused variables.

Harald Judt noreply at xfce.org
Tue Aug 7 07:56:01 CEST 2012


Updating branch refs/heads/master
         to d366a6b2d616f72d3848a40c2fb7d1d9b80e1307 (commit)
       from 9798ef24b723ad7ed09d4a36cca7d872bd731543 (commit)

commit d366a6b2d616f72d3848a40c2fb7d1d9b80e1307
Author: Harald Judt <h.judt at gmx.at>
Date:   Tue Aug 7 07:55:19 2012 +0200

    Silence compiler warnings, remove unused variables.

 panel-plugin/weather-config.c  |    2 +-
 panel-plugin/weather-data.c    |    9 ++++-----
 panel-plugin/weather-parsers.c |    3 +--
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 6a2e862..24355ff 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -214,7 +214,7 @@ sanitize_location_name(const gchar *location_name)
     pos = g_utf8_strchr(location_name, -1, ',');
     if (pos != NULL) {
         pos2 = pos;
-        while (pos2 = g_utf8_next_char(pos2))
+        while ((pos2 = g_utf8_next_char(pos2)))
             if (g_utf8_get_char(pos2) == ',') {
                 pos = pos2;
                 break;
diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index 2fd581f..f7d4622 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -42,7 +42,7 @@ has_timeslice(xml_weather *data,
               const time_t start_t,
               const time_t end_t)
 {
-    int i = 0;
+    guint i = 0;
 
     for (i = 0; i < data->num_timeslices; i++)
         if (data->timeslice[i]->start == start_t &&
@@ -363,7 +363,7 @@ find_shortest_timeslice(xml_weather *data,
 {
     xml_time *interval_data;
     time_t start_t, end_t;
-    gint hours, interval;
+    gint interval;
 
     /* set start and end times to the exact hour */
     end_tm.tm_min = start_tm.tm_min = 0;
@@ -462,8 +462,7 @@ make_current_conditions(xml_weather *data)
 {
     xml_time *conditions, *point_data, *interval_data;
     struct tm now_tm, start_tm, end_tm;
-    time_t now_t, start_t, end_t;
-    gint interval;
+    time_t now_t, end_t;
 
     /* get the current time */
     time(&now_t);
@@ -515,7 +514,7 @@ make_forecast_data(xml_weather *data,
                    const daytime dt)
 {
     xml_time *forecast = NULL, *point_data = NULL, *interval_data = NULL;
-    struct tm now_tm, start_tm, end_tm;
+    struct tm start_tm, end_tm;
     time_t now_t, start_t, end_t;
     gint interval;
 
diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index 184e6ad..c4afe39 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -282,7 +282,6 @@ parse_astro_location(xmlNode *cur_node,
                      xml_astro *astro)
 {
     xmlNode *child_node;
-    time_t sunrise_t, sunset_t, moonrise_t, moonset_t;
     gchar *sunrise, *sunset, *moonrise, *moonset;
     gchar *never_rises, *never_sets;
 
@@ -356,7 +355,7 @@ parse_astro_location(xmlNode *cur_node,
 xml_astro *
 parse_astro(xmlNode *cur_node)
 {
-    xmlNode *child_node, *time_node = NULL, *location_node = NULL;
+    xmlNode *child_node, *time_node = NULL;
     xml_astro *astro;
 
     if (cur_node == NULL || !NODE_IS_TYPE(cur_node, "astrodata"))


More information about the Xfce4-commits mailing list