[evolution-rss] Try to remove some warnings.



commit 01d43e8f75b3e9e5548a95858313dd9b3c0dc1e6
Author: Fridrich Strba <fridrich strba bluewin ch>
Date:   Fri Jun 12 14:46:29 2009 +0200

    Try to remove some warnings.

 src/misc.c     |    4 ++--
 src/parser.c   |    2 +-
 src/rss.c      |   25 ++++++++++++-------------
 src/strptime.c |   11 +++++++----
 4 files changed, 22 insertions(+), 20 deletions(-)
---
diff --git a/src/misc.c b/src/misc.c
index 6cfae6b..f41ea87 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -196,7 +196,7 @@ strplchr(gchar *source)
              if (*s == 0x3f)
              {
                    g_string_append(str, "%3F");
-                   *s++;
+                   s++;
              }
              else
                    g_string_append_c (str, *s++);
@@ -475,7 +475,7 @@ feed_is_new(gchar *file_name, gchar *needle)
 
         if (fr) {
             while (fgets(rfeed, 511, fr) != NULL) {
-                if (rfeed && strstr(rfeed, tmpneedle)) {
+                if (strstr(rfeed, tmpneedle)) {
                         occ=1;
                         break;
                 }
diff --git a/src/parser.c b/src/parser.c
index 36faf3f..68b02d8 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -1175,7 +1175,7 @@ reent:  s = (const unsigned char *)res->str;
                         in = pos-1;
                         state = 1;
                 }
-                *s++;
+                s++;
                 pos++;
                 len--;
         }
diff --git a/src/rss.c b/src/rss.c
index f8a124b..2b24be1 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -488,22 +488,21 @@ void
 browser_write(gchar *string, gint length, gchar *base)
 {
 	gchar *str = string;
-	gint len = length;
 	guint engine = fallback_engine();
 	switch (engine) {
 	case 2:
 #ifdef HAVE_GECKO
 	gtk_moz_embed_open_stream(GTK_MOZ_EMBED(rf->mozembed),
 			base, "text/html");
-	while (len > 0) {
-		if (len > 4096) {
+	while (length > 0) {
+		if (length > 4096) {
 			gtk_moz_embed_append_data(GTK_MOZ_EMBED(rf->mozembed),
 				str, 4096);
 			str+=4096;
 		} else
 			gtk_moz_embed_append_data(GTK_MOZ_EMBED(rf->mozembed),
-				str, len);
-	len-=4096;
+				str, length);
+	length-=4096;
 	}
 	gtk_moz_embed_close_stream(GTK_MOZ_EMBED(rf->mozembed));
 #endif
@@ -1740,8 +1739,8 @@ org_gnome_rss_controls (EMFormatHTML *efh, void *eb, EMFormatHTMLPObject *pobjec
 	gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0);
 	gtk_widget_show_all (vbox);
 
-      	int width = vbox->allocation.width;
-       	int height = vbox->allocation.height;
+//      	int width = vbox->allocation.width;
+//       	int height = vbox->allocation.height;
 
 	if (GTK_IS_WIDGET(eb))
         	gtk_container_add ((GtkContainer *) eb, vbox);
@@ -2307,12 +2306,12 @@ search_rss(char *buffer, int len)
 #ifdef _WIN32
 char *strcasestr(const char *a, const char *b)
 {
-       char *a2=g_ascii_strdown(a,-1), *b2=g_ascii_strdown(b,-1), *r=strstr(a2,b2);
-       if(r)
-               r=a+(r-a2);
-       g_free(a2);
-       g_free(b2);
-       return r;
+	char *a2=g_ascii_strdown(a,-1), *b2=g_ascii_strdown(b,-1), *r=strstr(a2,b2);
+	if(r)
+		r=(char *)a+(r-a2);
+	g_free(a2);
+	g_free(b2);
+	return r;
 }
 #endif
 
diff --git a/src/strptime.c b/src/strptime.c
index a542004..ee42789 100644
--- a/src/strptime.c
+++ b/src/strptime.c
@@ -162,8 +162,10 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, void *stat
   int cnt;
   int cnt_longest;
   size_t val;
+#ifdef _NL_CURRENT
   size_t num_eras;
   struct era_entry *era = NULL;
+#endif
   enum ptime_locale_status { nott, loc, raw } decided_longest;
   struct __strptime_state
   {
@@ -393,7 +395,9 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, void *stat
       break;
     case 'C':
       /* Match century number.  */
+#ifdef _NL_CURRENT
     match_century:
+#endif
       get_number (0, 99, 2);
       s.century = val;
       s.want_xday = 1;
@@ -632,7 +636,9 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, void *stat
       s.have_wday = 1;
       break;
     case 'y':
+#ifdef _NL_CURRENT
     match_year_in_century:
+#endif
       /* Match year within century.  */
       get_number (0, 99, 2);
       /* The "Year 2000: The Millennium Rollover" paper suggests that
@@ -662,7 +668,7 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, void *stat
           ++rp;
         if (*rp != '+' && *rp != '-')
           return NULL;
-        bool neg = *rp++ == '-';
+        rp++;
         int n = 0;
         while (n < 4 && *rp >= '0' && *rp <= '9')
           {
@@ -683,9 +689,6 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, void *stat
           }
         if (val > 1200)
           return NULL;
-        //tm->tm_gmtoff = (val * 3600) / 100;
-        //if (neg)
-        //  tm->tm_gmtoff = -tm->tm_gmtoff;
       }
       break;
     case 'E':



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]