[pan2: 63/68] silence compiler warnings



commit 962bb5e4dcc3a779deb00093fead2d16409ce988
Author: K. Haley <haleykd users sf net>
Date:   Tue Nov 2 21:25:58 2010 -0600

    silence compiler warnings

 pan/data-impl/groups.cc           |    2 +-
 pan/data-impl/memchunk.h          |    4 +---
 pan/data/article.h                |    2 +-
 pan/gui/post-ui.cc                |    1 -
 pan/tasks/socket-impl-gio.cc      |    3 ++-
 pan/usenet-utils/mime-utils.cc    |    1 -
 pan/usenet-utils/text-massager.cc |    2 +-
 7 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/pan/data-impl/groups.cc b/pan/data-impl/groups.cc
index b0a597c..f1901d3 100644
--- a/pan/data-impl/groups.cc
+++ b/pan/data-impl/groups.cc
@@ -162,7 +162,7 @@ namespace {
     if (g_path_is_absolute(fn))
       return base;
     const char *ph = file::get_pan_home().c_str();
-    char *temp = g_build_filename(ph, fn, 0);
+    char *temp = g_build_filename(ph, fn, NULL);
     std::string out(temp);
     g_free(temp);
     return out;
diff --git a/pan/data-impl/memchunk.h b/pan/data-impl/memchunk.h
index a96ff1c..b58cba2 100644
--- a/pan/data-impl/memchunk.h
+++ b/pan/data-impl/memchunk.h
@@ -45,7 +45,7 @@ namespace pan {
         return phead;
       }
 
-      MemChunk():chunks(0),head(0),phead(0),nelem(Chunk::size/sizeof(T)),count(0)
+      MemChunk():chunks(0),phead(0),head(0),nelem(Chunk::size/sizeof(T)),count(0)
       {grow();}
 
       ~MemChunk()
@@ -90,8 +90,6 @@ namespace pan {
       void grow()
       {
         Chunk *c=new Chunk;
-        T *p,*n=0;
-        int i;
 
         memset(c->mem,0,Chunk::size);
 
diff --git a/pan/data/article.h b/pan/data/article.h
index 74cd756..0d905b9 100644
--- a/pan/data/article.h
+++ b/pan/data/article.h
@@ -85,7 +85,7 @@ namespace pan
       Xref xref;
 
     public:
-      Article (): is_binary(false), lines(0), score(0), time_posted(0) {}
+      Article (): time_posted(0), lines(0), score(0), is_binary(false)  {}
       void clear ();
 
     private:
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 2b2affd..2b3940f 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -716,7 +716,6 @@ namespace
 void
 PostUI :: spawn_editor ()
 {
-  GtkTextBuffer * buf (_body_buf);
   bool ok (true);
 
   // open a new tmp file
diff --git a/pan/tasks/socket-impl-gio.cc b/pan/tasks/socket-impl-gio.cc
index dead2ba..b275f33 100644
--- a/pan/tasks/socket-impl-gio.cc
+++ b/pan/tasks/socket-impl-gio.cc
@@ -44,6 +44,7 @@ extern "C" {
   #define _WIN32_WINNT 0x0501
   #include <ws2tcpip.h>
   #undef gai_strerror
+  /*
   #define gai_strerror(i) gai_strerror_does_not_link (i)
   static const char*
   gai_strerror_does_not_link (int errval)
@@ -52,7 +53,7 @@ extern "C" {
     g_snprintf (buf, sizeof(buf), "Winsock error %d", errval);
     return buf;
   }
-
+  */
   static const char*
   get_last_error (int err)
   {
diff --git a/pan/usenet-utils/mime-utils.cc b/pan/usenet-utils/mime-utils.cc
index 817d198..52de825 100644
--- a/pan/usenet-utils/mime-utils.cc
+++ b/pan/usenet-utils/mime-utils.cc
@@ -499,7 +499,6 @@ separate_encoded_parts (GMimeStream  * istream, sep_state &state)
 
   sub_begin = 0;
   line = g_byte_array_sized_new (4096);
-  char *line_str, *pch;
 
   while ((line_len = stream_readln (istream, line, &linestart_pos)))
   {
diff --git a/pan/usenet-utils/text-massager.cc b/pan/usenet-utils/text-massager.cc
index 2993b51..cee9d2e 100644
--- a/pan/usenet-utils/text-massager.cc
+++ b/pan/usenet-utils/text-massager.cc
@@ -379,7 +379,7 @@ pan :: subject_to_path (const char * subjectline, const std::string &seperator)
   gchar *str1, *str2;
   const char *sep;
   std::string val (subjectline);
-  std::string::size_type pos;
+  //std::string::size_type pos;
   //stupid hack to silence the compiler
   GRegexCompileFlags cf0((GRegexCompileFlags)0);
   GRegexMatchFlags mf0((GRegexMatchFlags)0);



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