pan2 r346 - in trunk/pan: data data-impl general gui tasks usenet-utils



Author: csk
Date: Sat Jul  5 08:21:20 2008
New Revision: 346
URL: http://svn.gnome.org/viewvc/pan2?rev=346&view=rev

Log:
fix a lot of the compiler warnings, esp "unused" warnings


Added:
   trunk/pan/general/macros.h
Removed:
   trunk/pan/general/foreach.h
   trunk/pan/general/gassert.h
Modified:
   trunk/pan/data-impl/article-filter.cc
   trunk/pan/data-impl/data-impl.cc
   trunk/pan/data-impl/data-impl.h
   trunk/pan/data-impl/groups.cc
   trunk/pan/data-impl/headers.cc
   trunk/pan/data-impl/my-tree.cc
   trunk/pan/data-impl/profiles.cc
   trunk/pan/data-impl/server.cc
   trunk/pan/data-impl/task-archive.cc
   trunk/pan/data-impl/xover.cc
   trunk/pan/data/article-cache.cc
   trunk/pan/data/article.cc
   trunk/pan/data/data.h
   trunk/pan/data/parts.cc
   trunk/pan/data/xref.cc
   trunk/pan/general/Makefile.am
   trunk/pan/general/debug.h
   trunk/pan/general/progress.h
   trunk/pan/general/quark.h
   trunk/pan/general/utf8-utils.cc
   trunk/pan/general/worker-pool.cc
   trunk/pan/gui/actions.cc
   trunk/pan/gui/body-pane.cc
   trunk/pan/gui/dl-headers-ui.cc
   trunk/pan/gui/e-charset-picker.c
   trunk/pan/gui/group-pane.cc
   trunk/pan/gui/group-pane.h
   trunk/pan/gui/group-prefs-dialog.cc
   trunk/pan/gui/group-prefs.cc
   trunk/pan/gui/gui.cc
   trunk/pan/gui/gui.h
   trunk/pan/gui/header-pane.cc
   trunk/pan/gui/header-pane.h
   trunk/pan/gui/log-ui.cc
   trunk/pan/gui/pan-tree.cc
   trunk/pan/gui/pan.cc
   trunk/pan/gui/post-ui.cc
   trunk/pan/gui/prefs-ui.cc
   trunk/pan/gui/prefs.cc
   trunk/pan/gui/profiles-dialog.cc
   trunk/pan/gui/progress-view.cc
   trunk/pan/gui/progress-view.h
   trunk/pan/gui/save-ui.cc
   trunk/pan/gui/score-view-ui.cc
   trunk/pan/gui/server-ui.cc
   trunk/pan/gui/task-pane.cc
   trunk/pan/gui/task-pane.h
   trunk/pan/tasks/adaptable-set-test.cc
   trunk/pan/tasks/adaptable-set.cc
   trunk/pan/tasks/decoder.cc
   trunk/pan/tasks/nntp-pool.cc
   trunk/pan/tasks/nntp.cc
   trunk/pan/tasks/nntp.h
   trunk/pan/tasks/nzb-test.cc
   trunk/pan/tasks/nzb.cc
   trunk/pan/tasks/queue.cc
   trunk/pan/tasks/queue.h
   trunk/pan/tasks/socket-impl-gio.cc
   trunk/pan/tasks/socket-impl-scripted.cc
   trunk/pan/tasks/task-article.cc
   trunk/pan/tasks/task-groups.cc
   trunk/pan/tasks/task-xover.cc
   trunk/pan/tasks/task.cc
   trunk/pan/usenet-utils/filter-info.cc
   trunk/pan/usenet-utils/gnksa.cc
   trunk/pan/usenet-utils/message-check.cc
   trunk/pan/usenet-utils/mime-utils.cc
   trunk/pan/usenet-utils/scorefile-test.cc
   trunk/pan/usenet-utils/scorefile.cc
   trunk/pan/usenet-utils/text-massager.cc

Modified: trunk/pan/data-impl/article-filter.cc
==============================================================================
--- trunk/pan/data-impl/article-filter.cc	(original)
+++ trunk/pan/data-impl/article-filter.cc	Sat Jul  5 08:21:20 2008
@@ -20,7 +20,7 @@
 #include <config.h>
 #include <cassert>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/data/data.h>
 #include "article-filter.h"
 

Modified: trunk/pan/data-impl/data-impl.cc
==============================================================================
--- trunk/pan/data-impl/data-impl.cc	(original)
+++ trunk/pan/data-impl/data-impl.cc	Sat Jul  5 08:21:20 2008
@@ -28,8 +28,8 @@
 }
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/time-elapsed.h>
 #include "data-impl.h"
 

Modified: trunk/pan/data-impl/data-impl.h
==============================================================================
--- trunk/pan/data-impl/data-impl.h	(original)
+++ trunk/pan/data-impl/data-impl.h	Sat Jul  5 08:21:20 2008
@@ -27,8 +27,8 @@
 #include <vector>
 #include <deque>
 
-#include <pan/general/foreach.h>
 #include <pan/general/quark.h>
+#include <pan/general/macros.h>
 #include <pan/general/map-vector.h>
 #include <pan/general/sorted-vector.h>
 #include <pan/usenet-utils/numbers.h>

Modified: trunk/pan/data-impl/groups.cc
==============================================================================
--- trunk/pan/data-impl/groups.cc	(original)
+++ trunk/pan/data-impl/groups.cc	Sat Jul  5 08:21:20 2008
@@ -35,8 +35,8 @@
 
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/general/time-elapsed.h>
 

Modified: trunk/pan/data-impl/headers.cc
==============================================================================
--- trunk/pan/data-impl/headers.cc	(original)
+++ trunk/pan/data-impl/headers.cc	Sat Jul  5 08:21:20 2008
@@ -30,8 +30,8 @@
   #include <glib/gi18n.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/general/quark.h>
 #include <pan/general/time-elapsed.h>

Modified: trunk/pan/data-impl/my-tree.cc
==============================================================================
--- trunk/pan/data-impl/my-tree.cc	(original)
+++ trunk/pan/data-impl/my-tree.cc	Sat Jul  5 08:21:20 2008
@@ -20,8 +20,7 @@
 #include <config.h>
 #include <cassert>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
-#include <pan/general/gassert.h>
+#include <pan/general/macros.h>
 #include <pan/general/quark.h>
 #include <pan/usenet-utils/filter-info.h>
 #include <pan/data/article.h>

Modified: trunk/pan/data-impl/profiles.cc
==============================================================================
--- trunk/pan/data-impl/profiles.cc	(original)
+++ trunk/pan/data-impl/profiles.cc	Sat Jul  5 08:21:20 2008
@@ -32,8 +32,8 @@
 #include <pan/general/debug.h>
 #include <pan/general/string-view.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include "data-io.h"
 #include "profiles.h"
 
@@ -62,12 +62,12 @@
   };
 
   // called for open tags <foo bar='baz'>
-  void start_element (GMarkupParseContext * context,
+  void start_element (GMarkupParseContext * context           UNUSED,
                       const gchar         * element_name_str,
                       const gchar        ** attribute_names,
                       const gchar        ** attribute_vals,
                       gpointer              user_data,
-                      GError             ** error)
+                      GError             ** error             UNUSED)
   {
     MyContext& mc (*static_cast<MyContext*>(user_data));
     const std::string element_name (element_name_str);
@@ -101,10 +101,10 @@
   }
 
   // Called for close tags </foo>
-  void end_element    (GMarkupParseContext *context,
+  void end_element    (GMarkupParseContext *context           UNUSED,
                        const gchar         *element_name_str,
                        gpointer             user_data,
-                       GError             **error)
+                       GError             **error             UNUSED)
   {
     MyContext& mc (*static_cast<MyContext*>(user_data));
     const std::string element_name (element_name_str);
@@ -125,11 +125,11 @@
     }
   }
 
-  void text (GMarkupParseContext *context,
+  void text (GMarkupParseContext *context    UNUSED,
              const gchar         *text,
              gsize                text_len,  
              gpointer             user_data,
-             GError             **error)
+             GError             **error      UNUSED)
   {
     static_cast<MyContext*>(user_data)->text.assign (text, text_len);
   }

Modified: trunk/pan/data-impl/server.cc
==============================================================================
--- trunk/pan/data-impl/server.cc	(original)
+++ trunk/pan/data-impl/server.cc	Sat Jul  5 08:21:20 2008
@@ -31,8 +31,8 @@
 }
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include "data-impl.h"
 
@@ -238,12 +238,12 @@
     key_to_keyvals_t data;
   };
 
-  void start_element (GMarkupParseContext *context,
+  void start_element (GMarkupParseContext *context          UNUSED,
                       const gchar         *element_name,
                       const gchar        **attribute_names,
                       const gchar        **attribute_vals,
                       gpointer             user_data,
-                      GError             **error)
+                      GError             **error            UNUSED)
   {
     ServerParseContext& mc (*static_cast<ServerParseContext*>(user_data));
 
@@ -253,21 +253,21 @@
            mc.key = *v;
   }
 
-  void end_element (GMarkupParseContext *context,
+  void end_element (GMarkupParseContext *context        UNUSED,
                     const gchar         *element_name,
                     gpointer             user_data,
-                    GError             **error)
+                    GError             **error          UNUSED)
   {
     ServerParseContext& mc (*static_cast<ServerParseContext*>(user_data));
     if (!mc.key.empty())
       mc.data[mc.key][element_name] = mc.text;
   }
 
-  void text (GMarkupParseContext *context,
+  void text (GMarkupParseContext *context    UNUSED,
              const gchar         *text,
              gsize                text_len,  
              gpointer             user_data,
-             GError             **error)
+             GError             **error      UNUSED)
   {
     static_cast<ServerParseContext*>(user_data)->text.assign (text, text_len);
   }

Modified: trunk/pan/data-impl/task-archive.cc
==============================================================================
--- trunk/pan/data-impl/task-archive.cc	(original)
+++ trunk/pan/data-impl/task-archive.cc	Sat Jul  5 08:21:20 2008
@@ -20,7 +20,7 @@
 #include <config.h>
 #include <glib.h>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/tasks/nzb.h>
 #include "data-impl.h"
 #include "data-io.h"

Modified: trunk/pan/data-impl/xover.cc
==============================================================================
--- trunk/pan/data-impl/xover.cc	(original)
+++ trunk/pan/data-impl/xover.cc	Sat Jul  5 08:21:20 2008
@@ -25,8 +25,8 @@
   #include <gmime/gmime.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/general/quark.h>
 #include <pan/usenet-utils/mime-utils.h>

Modified: trunk/pan/data/article-cache.cc
==============================================================================
--- trunk/pan/data/article-cache.cc	(original)
+++ trunk/pan/data/article-cache.cc	Sat Jul  5 08:21:20 2008
@@ -34,7 +34,7 @@
 
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/general/log.h>
 #include <pan/general/string-view.h>

Modified: trunk/pan/data/article.cc
==============================================================================
--- trunk/pan/data/article.cc	(original)
+++ trunk/pan/data/article.cc	Sat Jul  5 08:21:20 2008
@@ -22,7 +22,7 @@
 #include <algorithm>
 #include <glib.h>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/string-view.h>
 #include "article.h"
 

Modified: trunk/pan/data/data.h
==============================================================================
--- trunk/pan/data/data.h	(original)
+++ trunk/pan/data/data.h	Sat Jul  5 08:21:20 2008
@@ -25,6 +25,7 @@
 #include <map>
 #include <vector>
 
+#include <pan/general/macros.h>
 #include <pan/general/quark.h>
 #include <pan/general/string-view.h>
 #include <pan/usenet-utils/scorefile.h>
@@ -217,11 +218,12 @@
         virtual ~Listener () {}
 
         virtual void on_grouplist_rebuilt () {}
-        virtual void on_group_read (const Quark& group) {}
-        virtual void on_group_subscribe (const Quark& group, bool sub) {}
-        virtual void on_group_counts (const Quark& group,
-                                      unsigned long unread,
-                                      unsigned long total) {}
+        virtual void on_group_read (const Quark& group UNUSED) {}
+        virtual void on_group_subscribe (const Quark & group UNUSED,
+                                         bool          sub   UNUSED) {}
+        virtual void on_group_counts (const Quark& group   UNUSED,
+                                      unsigned long unread UNUSED,
+                                      unsigned long total  UNUSED) {}
       };
 
       void add_listener (Listener * l);

Modified: trunk/pan/data/parts.cc
==============================================================================
--- trunk/pan/data/parts.cc	(original)
+++ trunk/pan/data/parts.cc	Sat Jul  5 08:21:20 2008
@@ -21,7 +21,7 @@
 #include <cassert>
 #include <algorithm>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include "article.h"
 
 using namespace pan;
@@ -296,7 +296,7 @@
 void
 PartBatch :: init (const Quark  & mid,
                    number_t       n_parts_total,
-                   number_t       n_parts_found)
+                   number_t       n_parts_found UNUSED )
 {
   this->reference_mid = mid;
   this->packed_mids_len = 0;

Modified: trunk/pan/data/xref.cc
==============================================================================
--- trunk/pan/data/xref.cc	(original)
+++ trunk/pan/data/xref.cc	Sat Jul  5 08:21:20 2008
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/general/string-view.h>
 #include "xref.h"

Modified: trunk/pan/general/Makefile.am
==============================================================================
--- trunk/pan/general/Makefile.am	(original)
+++ trunk/pan/general/Makefile.am	Sat Jul  5 08:21:20 2008
@@ -20,11 +20,10 @@
  defgroup.h \
  e-util.h \
  file-util.h \
- foreach.h \
- gassert.h \
  line-reader.h \
  locking.h \
  log.h \
+ macros.h \
  map-vector.h \
  messages.h \
  progress.h \

Modified: trunk/pan/general/debug.h
==============================================================================
--- trunk/pan/general/debug.h	(original)
+++ trunk/pan/general/debug.h	Sat Jul  5 08:21:20 2008
@@ -42,4 +42,13 @@
       std::cerr << LINE_ID << ' ' << A << '\n'; \
   } while (0)
 
+#ifndef UNUSED
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+#endif
+
+
 #endif

Added: trunk/pan/general/macros.h
==============================================================================
--- (empty file)
+++ trunk/pan/general/macros.h	Sat Jul  5 08:21:20 2008
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * Pan - A Newsreader for Gtk+
+ * Copyright (C) 2002-2006  Charles Kerr <charles rebelbase com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __Pan_Macros_h__
+#define __Pan_Macros_h__
+
+/**
+***  foreach
+**/
+
+#define foreach(Type,var,itname) \
+  for (Type::iterator itname(var.begin()), \
+                            itname##end(var.end()); itname!=itname##end; \
+                            ++itname)
+
+#define foreach_const(Type,var,itname) \
+  for (Type::const_iterator itname(var.begin()), \
+                            itname##end(var.end()); itname!=itname##end; \
+                            ++itname)
+
+#define foreach_r(Type,var,itname) \
+  for (Type::reverse_iterator itname(var.rbegin()), \
+                              itname##end(var.rend()); itname!=itname##end; \
+                              ++itname)
+
+#define foreach_const_r(Type,var,itname) \
+  for (Type::const_reverse_iterator itname(var.rbegin()), \
+                           itname##end(var.rend()); itname!=itname##end; \
+                           ++itname)
+
+/**
+***  UNUSED
+**/
+
+#ifndef UNUSED
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+#endif
+
+/**
+***  g_assert
+**/
+
+extern "C"
+{
+  #include <glibconfig.h> // get the version
+  #include <glib/gutils.h> // get GLIB_CHECK_VERSION
+
+  // pick up g_assert()
+  #if GLIB_CHECK_VERSION(2,16,0)
+    #include <glib/gtestutils.h>
+  #else
+    #include <glib/gmessages.h>
+  #endif
+}
+
+#endif

Modified: trunk/pan/general/progress.h
==============================================================================
--- trunk/pan/general/progress.h	(original)
+++ trunk/pan/general/progress.h	Sat Jul  5 08:21:20 2008
@@ -23,6 +23,7 @@
 #include <set>
 #include <string>
 #include <vector>
+#include <pan/general/debug.h>
 #include <pan/general/string-view.h>
 
 namespace pan
@@ -48,10 +49,10 @@
         Listener () {}
         virtual ~Listener () {}
         virtual void on_progress_pulse (Progress&) { }
-        virtual void on_progress_step (Progress&, int percentage) { }
+        virtual void on_progress_step (Progress&, int percentage UNUSED) { }
         virtual void on_progress_status (Progress&, const StringView&) { }
         virtual void on_progress_error (Progress&, const StringView&) { }
-        virtual void on_progress_finished (Progress&, int status) { }
+        virtual void on_progress_finished (Progress&, int status UNUSED) { }
       };
 
     private:

Modified: trunk/pan/general/quark.h
==============================================================================
--- trunk/pan/general/quark.h	(original)
+++ trunk/pan/general/quark.h	Sat Jul  5 08:21:20 2008
@@ -75,7 +75,7 @@
         Impl (): refcount(0), len(0), str(0) {}
         Impl (const StringView& v): refcount(0), len(v.len), str(const_cast<char*>(v.str)) {}
         StringView to_view () const { return StringView(str,len); }
-        bool operator() (const Impl& a, const Impl& b) const { return StringView(str,len) == StringView(b.str,b.len); }
+        //wtf? bool operator() (const Impl& a, const Impl& b) const { return StringView(str,len) == StringView(b.str,b.len); }
         bool operator== (const Impl& b) const { return StringView(str,len) == StringView(b.str,b.len); }
       };
 

Modified: trunk/pan/general/utf8-utils.cc
==============================================================================
--- trunk/pan/general/utf8-utils.cc	(original)
+++ trunk/pan/general/utf8-utils.cc	Sat Jul  5 08:21:20 2008
@@ -26,9 +26,8 @@
 }
 #include <locale.h>
 #include <gmime/gmime.h>
-#include <pan/general/gassert.h>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/log.h>
 #include "utf8-utils.h"
 

Modified: trunk/pan/general/worker-pool.cc
==============================================================================
--- trunk/pan/general/worker-pool.cc	(original)
+++ trunk/pan/general/worker-pool.cc	Sat Jul  5 08:21:20 2008
@@ -22,7 +22,8 @@
  */
 #include <cassert>
 #include <glib/gmain.h> // for g_idle_add
-#include <pan/general/foreach.h>
+#include <pan/general/debug.h>
+#include <pan/general/macros.h>
 #include "worker-pool.h"
 
 using namespace pan;
@@ -68,7 +69,7 @@
 }
 
 void
-WorkerPool :: Worker :: worker_thread_func (gpointer g, gpointer unused)
+WorkerPool :: Worker :: worker_thread_func (gpointer g, gpointer unused UNUSED)
 {
   static_cast<Worker*>(g)->do_work ();
   g_idle_add (main_thread_cleanup_cb, g); // jump to main_thread_cleanup_cb

Modified: trunk/pan/gui/actions.cc
==============================================================================
--- trunk/pan/gui/actions.cc	(original)
+++ trunk/pan/gui/actions.cc	Sat Jul  5 08:21:20 2008
@@ -98,73 +98,73 @@
 
   GtkActionGroup * _group (0);
 
-  void do_prompt_for_charset           (GtkAction * a) { pan_ui->do_prompt_for_charset(); }
-  void do_read_selected_group          (GtkAction * a) { pan_ui->do_read_selected_group(); }
-  void do_mark_selected_groups_read    (GtkAction * a) { pan_ui->do_mark_selected_groups_read(); }
-  void do_clear_selected_groups        (GtkAction * a) { pan_ui->do_clear_selected_groups(); }
-  void do_xover_selected_groups        (GtkAction * a) { pan_ui->do_xover_selected_groups(); }
-  void do_xover_subscribed_groups      (GtkAction * a) { pan_ui->do_xover_subscribed_groups(); }
-  void do_download_headers             (GtkAction * a) { pan_ui->do_download_headers(); }
-  void do_refresh_groups               (GtkAction * a) { pan_ui->do_refresh_groups(); }
-  void do_subscribe_selected_groups    (GtkAction * a) { pan_ui->do_subscribe_selected_groups(); }
-  void do_unsubscribe_selected_groups  (GtkAction * a) { pan_ui->do_unsubscribe_selected_groups(); }
-  void do_save_articles                (GtkAction * a) { pan_ui->do_save_articles(); }
-  void do_save_articles_from_nzb       (GtkAction * a) { pan_ui->do_save_articles_from_nzb(); }
-  void do_print                        (GtkAction * a) { pan_ui->do_print(); }
-  void do_import_tasks                 (GtkAction * a) { pan_ui->do_import_tasks(); }
-  void do_cancel_latest_task           (GtkAction * a) { pan_ui->do_cancel_latest_task(); }
-  void do_show_task_window             (GtkAction * a) { pan_ui->do_show_task_window(); }
-  void do_show_log_window              (GtkAction * a) { pan_ui->do_show_log_window(); }
-  void do_quit                         (GtkAction * a) { pan_ui->do_quit(); }
-  void do_clear_header_pane            (GtkAction * a) { pan_ui->do_clear_header_pane(); }
-  void do_clear_body_pane              (GtkAction * a) { pan_ui->do_clear_body_pane(); }
-  void do_select_all_articles          (GtkAction * a) { pan_ui->do_select_all_articles(); }
-  void do_unselect_all_articles        (GtkAction * a) { pan_ui->do_unselect_all_articles(); }
-  void do_add_subthreads_to_selection  (GtkAction * a) { pan_ui->do_add_subthreads_to_selection(); }
-  void do_add_threads_to_selection     (GtkAction * a) { pan_ui->do_add_threads_to_selection(); }
-  void do_add_similar_to_selection     (GtkAction * a) { pan_ui->do_add_similar_to_selection(); }
-  void do_select_article_body          (GtkAction * a) { pan_ui->do_select_article_body(); }
-  void do_show_preferences_dialog      (GtkAction * a) { pan_ui->do_show_preferences_dialog(); }
-  void do_show_group_preferences_dialog(GtkAction * a) { pan_ui->do_show_group_preferences_dialog(); }
-  void do_show_profiles_dialog         (GtkAction * a) { pan_ui->do_show_profiles_dialog(); }
-  void do_jump_to_group_tab            (GtkAction * a) { pan_ui->do_jump_to_group_tab(); }
-  void do_jump_to_header_tab           (GtkAction * a) { pan_ui->do_jump_to_header_tab(); }
-  void do_jump_to_body_tab             (GtkAction * a) { pan_ui->do_jump_to_body_tab(); }
-  void do_rot13_selected_text          (GtkAction * a) { pan_ui->do_rot13_selected_text(); }
-  void do_download_selected_article    (GtkAction * a) { pan_ui->do_download_selected_article(); }
-  void do_read_selected_article        (GtkAction * a) { pan_ui->do_read_selected_article(); }
-  void do_show_selected_article_info   (GtkAction * a) { pan_ui->do_show_selected_article_info(); }
-  void do_read_more                    (GtkAction * a) { pan_ui->do_read_more(); }
-  void do_read_less                    (GtkAction * a) { pan_ui->do_read_less(); }
-  void do_read_next_unread_group       (GtkAction * a) { pan_ui->do_read_next_unread_group(); }
-  void do_read_next_group              (GtkAction * a) { pan_ui->do_read_next_group(); }
-  void do_read_next_unread_article     (GtkAction * a) { pan_ui->do_read_next_unread_article(); }
-  void do_read_next_article            (GtkAction * a) { pan_ui->do_read_next_article(); }
-  void do_read_next_watched_article    (GtkAction * a) { pan_ui->do_read_next_watched_article(); }
-  void do_read_next_unread_thread      (GtkAction * a) { pan_ui->do_read_next_unread_thread(); }
-  void do_read_next_thread             (GtkAction * a) { pan_ui->do_read_next_thread(); }
-  void do_read_previous_article        (GtkAction * a) { pan_ui->do_read_previous_article(); }
-  void do_read_previous_thread         (GtkAction * a) { pan_ui->do_read_previous_thread(); }
-  void do_read_parent_article          (GtkAction * a) { pan_ui->do_read_parent_article(); }
-  void do_show_servers_dialog          (GtkAction * a) { pan_ui->do_show_servers_dialog(); }
-  void do_plonk                        (GtkAction * a) { pan_ui->do_plonk(); }
-  void do_ignore                       (GtkAction * a) { pan_ui->do_ignore(); }
-  void do_watch                        (GtkAction * a) { pan_ui->do_watch(); }
-  void do_show_score_dialog            (GtkAction * a) { pan_ui->do_show_score_dialog(); }
-  void do_show_new_score_dialog        (GtkAction * a) { pan_ui->do_show_new_score_dialog(); }
-  void do_cancel_article               (GtkAction * a) { pan_ui->do_cancel_article(); }
-  void do_supersede_article            (GtkAction * a) { pan_ui->do_supersede_article(); }
-  void do_delete_article               (GtkAction * a) { pan_ui->do_delete_article(); }
-  void do_clear_article_cache          (GtkAction * a) { pan_ui->do_clear_article_cache(); }
-  void do_mark_article_read            (GtkAction * a) { pan_ui->do_mark_article_read(); }
-  void do_mark_article_unread          (GtkAction * a) { pan_ui->do_mark_article_unread(); }
-  void do_post                         (GtkAction * a) { pan_ui->do_post(); }
-  void do_followup_to                  (GtkAction * a) { pan_ui->do_followup_to(); }
-  void do_reply_to                     (GtkAction * a) { pan_ui->do_reply_to(); }
-  void do_pan_web                      (GtkAction * a) { pan_ui->do_pan_web(); }
-  void do_bug_report                   (GtkAction * a) { pan_ui->do_bug_report(); }
-  void do_tip_jar                      (GtkAction * a) { pan_ui->do_tip_jar(); }
-  void do_about_pan                    (GtkAction * a) { pan_ui->do_about_pan(); }
+  void do_prompt_for_charset           (GtkAction*) { pan_ui->do_prompt_for_charset(); }
+  void do_read_selected_group          (GtkAction*) { pan_ui->do_read_selected_group(); }
+  void do_mark_selected_groups_read    (GtkAction*) { pan_ui->do_mark_selected_groups_read(); }
+  void do_clear_selected_groups        (GtkAction*) { pan_ui->do_clear_selected_groups(); }
+  void do_xover_selected_groups        (GtkAction*) { pan_ui->do_xover_selected_groups(); }
+  void do_xover_subscribed_groups      (GtkAction*) { pan_ui->do_xover_subscribed_groups(); }
+  void do_download_headers             (GtkAction*) { pan_ui->do_download_headers(); }
+  void do_refresh_groups               (GtkAction*) { pan_ui->do_refresh_groups(); }
+  void do_subscribe_selected_groups    (GtkAction*) { pan_ui->do_subscribe_selected_groups(); }
+  void do_unsubscribe_selected_groups  (GtkAction*) { pan_ui->do_unsubscribe_selected_groups(); }
+  void do_save_articles                (GtkAction*) { pan_ui->do_save_articles(); }
+  void do_save_articles_from_nzb       (GtkAction*) { pan_ui->do_save_articles_from_nzb(); }
+  void do_print                        (GtkAction*) { pan_ui->do_print(); }
+  void do_import_tasks                 (GtkAction*) { pan_ui->do_import_tasks(); }
+  void do_cancel_latest_task           (GtkAction*) { pan_ui->do_cancel_latest_task(); }
+  void do_show_task_window             (GtkAction*) { pan_ui->do_show_task_window(); }
+  void do_show_log_window              (GtkAction*) { pan_ui->do_show_log_window(); }
+  void do_quit                         (GtkAction*) { pan_ui->do_quit(); }
+  void do_clear_header_pane            (GtkAction*) { pan_ui->do_clear_header_pane(); }
+  void do_clear_body_pane              (GtkAction*) { pan_ui->do_clear_body_pane(); }
+  void do_select_all_articles          (GtkAction*) { pan_ui->do_select_all_articles(); }
+  void do_unselect_all_articles        (GtkAction*) { pan_ui->do_unselect_all_articles(); }
+  void do_add_subthreads_to_selection  (GtkAction*) { pan_ui->do_add_subthreads_to_selection(); }
+  void do_add_threads_to_selection     (GtkAction*) { pan_ui->do_add_threads_to_selection(); }
+  void do_add_similar_to_selection     (GtkAction*) { pan_ui->do_add_similar_to_selection(); }
+  void do_select_article_body          (GtkAction*) { pan_ui->do_select_article_body(); }
+  void do_show_preferences_dialog      (GtkAction*) { pan_ui->do_show_preferences_dialog(); }
+  void do_show_group_preferences_dialog(GtkAction*) { pan_ui->do_show_group_preferences_dialog(); }
+  void do_show_profiles_dialog         (GtkAction*) { pan_ui->do_show_profiles_dialog(); }
+  void do_jump_to_group_tab            (GtkAction*) { pan_ui->do_jump_to_group_tab(); }
+  void do_jump_to_header_tab           (GtkAction*) { pan_ui->do_jump_to_header_tab(); }
+  void do_jump_to_body_tab             (GtkAction*) { pan_ui->do_jump_to_body_tab(); }
+  void do_rot13_selected_text          (GtkAction*) { pan_ui->do_rot13_selected_text(); }
+  void do_download_selected_article    (GtkAction*) { pan_ui->do_download_selected_article(); }
+  void do_read_selected_article        (GtkAction*) { pan_ui->do_read_selected_article(); }
+  void do_show_selected_article_info   (GtkAction*) { pan_ui->do_show_selected_article_info(); }
+  void do_read_more                    (GtkAction*) { pan_ui->do_read_more(); }
+  void do_read_less                    (GtkAction*) { pan_ui->do_read_less(); }
+  void do_read_next_unread_group       (GtkAction*) { pan_ui->do_read_next_unread_group(); }
+  void do_read_next_group              (GtkAction*) { pan_ui->do_read_next_group(); }
+  void do_read_next_unread_article     (GtkAction*) { pan_ui->do_read_next_unread_article(); }
+  void do_read_next_article            (GtkAction*) { pan_ui->do_read_next_article(); }
+  void do_read_next_watched_article    (GtkAction*) { pan_ui->do_read_next_watched_article(); }
+  void do_read_next_unread_thread      (GtkAction*) { pan_ui->do_read_next_unread_thread(); }
+  void do_read_next_thread             (GtkAction*) { pan_ui->do_read_next_thread(); }
+  void do_read_previous_article        (GtkAction*) { pan_ui->do_read_previous_article(); }
+  void do_read_previous_thread         (GtkAction*) { pan_ui->do_read_previous_thread(); }
+  void do_read_parent_article          (GtkAction*) { pan_ui->do_read_parent_article(); }
+  void do_show_servers_dialog          (GtkAction*) { pan_ui->do_show_servers_dialog(); }
+  void do_plonk                        (GtkAction*) { pan_ui->do_plonk(); }
+  void do_ignore                       (GtkAction*) { pan_ui->do_ignore(); }
+  void do_watch                        (GtkAction*) { pan_ui->do_watch(); }
+  void do_show_score_dialog            (GtkAction*) { pan_ui->do_show_score_dialog(); }
+  void do_show_new_score_dialog        (GtkAction*) { pan_ui->do_show_new_score_dialog(); }
+  void do_cancel_article               (GtkAction*) { pan_ui->do_cancel_article(); }
+  void do_supersede_article            (GtkAction*) { pan_ui->do_supersede_article(); }
+  void do_delete_article               (GtkAction*) { pan_ui->do_delete_article(); }
+  void do_clear_article_cache          (GtkAction*) { pan_ui->do_clear_article_cache(); }
+  void do_mark_article_read            (GtkAction*) { pan_ui->do_mark_article_read(); }
+  void do_mark_article_unread          (GtkAction*) { pan_ui->do_mark_article_unread(); }
+  void do_post                         (GtkAction*) { pan_ui->do_post(); }
+  void do_followup_to                  (GtkAction*) { pan_ui->do_followup_to(); }
+  void do_reply_to                     (GtkAction*) { pan_ui->do_reply_to(); }
+  void do_pan_web                      (GtkAction*) { pan_ui->do_pan_web(); }
+  void do_bug_report                   (GtkAction*) { pan_ui->do_bug_report(); }
+  void do_tip_jar                      (GtkAction*) { pan_ui->do_tip_jar(); }
+  void do_about_pan                    (GtkAction*) { pan_ui->do_about_pan(); }
 
   void do_work_online         (GtkToggleAction * a) { pan_ui->do_work_online         (gtk_toggle_action_get_active(a)); }
   void do_tabbed_layout       (GtkToggleAction * a) { pan_ui->do_tabbed_layout       (gtk_toggle_action_get_active(a)); }
@@ -404,7 +404,7 @@
   static const char * show_strings[SHOW_N] = { "articles", "threads", "subthreads" };
 
   void
-  show_matches_cb (GtkAction *action, GtkRadioAction *current)
+  show_matches_cb (GtkAction*, GtkRadioAction *current)
   {
     const int mode (gtk_radio_action_get_current_value (current));
     g_assert (0<=mode && mode<SHOW_N);

Modified: trunk/pan/gui/body-pane.cc
==============================================================================
--- trunk/pan/gui/body-pane.cc	(original)
+++ trunk/pan/gui/body-pane.cc	Sat Jul  5 08:21:20 2008
@@ -28,8 +28,8 @@
   #include <gmime/gmime.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/utf8-utils.h>
 #include <pan/usenet-utils/gnksa.h>
 #include <pan/usenet-utils/mime-utils.h>

Modified: trunk/pan/gui/dl-headers-ui.cc
==============================================================================
--- trunk/pan/gui/dl-headers-ui.cc	(original)
+++ trunk/pan/gui/dl-headers-ui.cc	Sat Jul  5 08:21:20 2008
@@ -23,7 +23,7 @@
   #include <glib/gi18n.h>
   #include <gtk/gtk.h>
 }
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/tasks/queue.h>
 #include <pan/tasks/task-xover.h>
 #include "dl-headers-ui.h"
@@ -87,7 +87,7 @@
   }
 
   int
-  spin_tickled_cb (GtkWidget * w, GdkEventFocus * event, gpointer user_data)
+  spin_tickled_cb (GtkWidget *, GdkEventFocus *, gpointer user_data)
   {
     // if a user clicked in the spinbutton window,
     // select the spinbutton radiobutton for them.

Modified: trunk/pan/gui/e-charset-picker.c
==============================================================================
--- trunk/pan/gui/e-charset-picker.c	(original)
+++ trunk/pan/gui/e-charset-picker.c	Sat Jul  5 08:21:20 2008
@@ -27,6 +27,8 @@
 #include <string.h>
 #include <iconv.h>
 
+#include <glib/gmacros.h>
+
 #include <gtk/gtkhbox.h>
 #include <gtk/gtkvbox.h>
 #include <gtk/gtkentry.h>
@@ -193,7 +195,7 @@
 }
 
 static void
-activate_entry (GtkWidget *entry, GtkDialog *dialog)
+activate_entry (GtkWidget *entry G_GNUC_UNUSED, GtkDialog *dialog)
 {
 	gtk_dialog_response (dialog, GTK_RESPONSE_OK);
 }

Modified: trunk/pan/gui/group-pane.cc
==============================================================================
--- trunk/pan/gui/group-pane.cc	(original)
+++ trunk/pan/gui/group-pane.cc	Sat Jul  5 08:21:20 2008
@@ -25,8 +25,8 @@
   #include <gtk/gtk.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/quark.h>
 #include <pan/general/text-match.h>
 #include <pan/general/time-elapsed.h>
@@ -146,7 +146,7 @@
 }
 
 void
-GroupPane ::  do_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer pane_g)
+GroupPane ::  do_popup_menu (GtkWidget*, GdkEventButton *event, gpointer pane_g)
 {
   GroupPane * self (static_cast<GroupPane*>(pane_g));
   GtkWidget * menu (self->_action_manager.get_action_widget ("/group-pane-popup"));
@@ -166,9 +166,9 @@
 }
 
 void
-GroupPane :: on_row_activated (GtkTreeView          * treeview,
-                               GtkTreePath          * path,
-                               GtkTreeViewColumn    * col,
+GroupPane :: on_row_activated (GtkTreeView          * ,
+                               GtkTreePath          * ,
+                               GtkTreeViewColumn    * ,
                                gpointer               pane_g)
 {
   // user may have activated by selecting the row... wait for the GtkTreeSelection to catch up
@@ -179,7 +179,7 @@
 {
   bool row_collapsed_or_expanded (false);
 
-  void row_collapsed_or_expanded_cb (GtkTreeView *view, GtkTreeIter *iter, GtkTreePath *path, gpointer unused)
+  void row_collapsed_or_expanded_cb (GtkTreeView*, GtkTreeIter*, GtkTreePath*, gpointer)
   {
     row_collapsed_or_expanded = true;
   }
@@ -302,7 +302,7 @@
   }
 
   void
-  delete_rows (gpointer data, GObject * dead_object)
+  delete_rows (gpointer data, GObject*)
   {
     delete [] static_cast<MyRow*>(data);
   }
@@ -312,7 +312,7 @@
   struct NoopRowDispose: public PanTreeStore::RowDispose
   {
     virtual ~NoopRowDispose () { }
-    virtual void row_dispose (PanTreeStore *store, PanTreeStore::Row* row) { }
+    virtual void row_dispose (PanTreeStore*, PanTreeStore::Row*) { }
   };
 
   NoopRowDispose noop_row_dispose;
@@ -473,7 +473,7 @@
        _dirty_groups_idle_tag = g_timeout_add (333, dirty_groups_idle, this);
 }
 void
-GroupPane :: on_group_counts (const Quark& groupname, unsigned long unread, unsigned long total)
+GroupPane :: on_group_counts (const Quark& groupname, unsigned long, unsigned long)
 {
   on_group_read (groupname);
 }
@@ -549,8 +549,8 @@
   }
 
   gboolean search_entry_focus_in_cb (GtkWidget     * w,
-                                     GdkEventFocus * unused1,
-                                     gpointer        unused2)
+                                     GdkEventFocus * ,
+                                     gpointer        )
   {
     gtk_widget_modify_text (w, GTK_STATE_NORMAL, NULL); // resets
     set_search_entry (w, search_text.c_str());
@@ -570,8 +570,8 @@
   }
 
   gboolean search_entry_focus_out_cb (GtkWidget     * w,
-                                      GdkEventFocus * unused1,
-                                      gpointer        unused2)
+                                      GdkEventFocus * ,
+                                      gpointer        )
   {
     refresh_search_entry (w);
     return false;
@@ -591,13 +591,13 @@
     }
   }
 
-  void search_entry_activated (GtkEntry * entry, gpointer pane_gpointer)
+  void search_entry_activated (GtkEntry*, gpointer pane_gpointer)
   {
     search_activate (static_cast<GroupPane*>(pane_gpointer));
     remove_activate_soon_tag ();
   }
 
-  void clear_button_clicked_cb (SexyIconEntry *e, SexyIconEntryPosition icon_pos, int button, gpointer pane_gpointer)
+  void clear_button_clicked_cb (SexyIconEntry *e, SexyIconEntryPosition, int, gpointer pane_gpointer)
   {
     set_search_entry (GTK_WIDGET(e), "");
     refresh_search_entry (GTK_WIDGET(e));
@@ -637,11 +637,11 @@
   bool shorten;
 
   void
-  render_group_name (GtkTreeViewColumn * col,
+  render_group_name (GtkTreeViewColumn * ,
                      GtkCellRenderer   * renderer,
                      GtkTreeModel      * model,
                      GtkTreeIter       * iter,
-                     gpointer            user_data)
+                     gpointer            )
   {
     PanTreeStore * tree (PAN_TREE_STORE(model));
     MyRow * row (dynamic_cast<MyRow*>(tree->get_row (iter)));
@@ -778,11 +778,11 @@
 namespace
 {
   gboolean
-  select_func (GtkTreeSelection * selection,
+  select_func (GtkTreeSelection * ,
                GtkTreeModel     * model,
                GtkTreePath      * path,
-               gboolean           path_currently_selected,
-               gpointer           unused)
+               gboolean           ,
+               gpointer           )
   {
     GtkTreeIter iter;
     PanTreeStore * store (PAN_TREE_STORE(model));
@@ -814,7 +814,7 @@
 }
 
 void
-GroupPane :: on_selection_changed (GtkTreeSelection * sel, gpointer pane_gpointer)
+GroupPane :: on_selection_changed (GtkTreeSelection*, gpointer pane_gpointer)
 {
   GroupPane * self (static_cast<GroupPane*>(pane_gpointer));
   Quark group (self->get_first_selection());
@@ -922,14 +922,14 @@
 }
 
 void
-GroupPane :: on_prefs_flag_changed (const StringView& key, bool value)
+GroupPane :: on_prefs_flag_changed (const StringView& key, bool)
 {
   if (key == "group-pane-font-enabled")
     refresh_font ();
 }
 
 void
-GroupPane :: on_prefs_string_changed (const StringView& key, const StringView& value)
+GroupPane :: on_prefs_string_changed (const StringView& key, const StringView&)
 {
   if (key == "group-pane-font")
     refresh_font ();

Modified: trunk/pan/gui/group-pane.h
==============================================================================
--- trunk/pan/gui/group-pane.h	(original)
+++ trunk/pan/gui/group-pane.h	Sat Jul  5 08:21:20 2008
@@ -82,9 +82,9 @@
 
     private:
       virtual void on_prefs_flag_changed (const StringView& key, bool value);
-      virtual void on_prefs_int_changed (const StringView& key, int color) { }
+      virtual void on_prefs_int_changed (const StringView&, int) { }
       virtual void on_prefs_string_changed (const StringView& key, const StringView& value);
-      virtual void on_prefs_color_changed (const StringView& key, const GdkColor& color) { }
+      virtual void on_prefs_color_changed (const StringView&, const GdkColor&) { }
 
     private:
       quarks_t _dirty_groups;

Modified: trunk/pan/gui/group-prefs-dialog.cc
==============================================================================
--- trunk/pan/gui/group-prefs-dialog.cc	(original)
+++ trunk/pan/gui/group-prefs-dialog.cc	Sat Jul  5 08:21:20 2008
@@ -23,7 +23,7 @@
   #include <gtk/gtk.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/data/data.h>
 #include "e-charset-picker.h"
 #include "group-prefs-dialog.h"
@@ -77,7 +77,7 @@
 
 void
 GroupPrefsDialog :: response_cb (GtkDialog  * dialog,
-                                 int          response,
+                                 int          ,
                                  gpointer     user_data)
 {
   static_cast<GroupPrefsDialog*>(user_data)->save_from_gui ();

Modified: trunk/pan/gui/group-prefs.cc
==============================================================================
--- trunk/pan/gui/group-prefs.cc	(original)
+++ trunk/pan/gui/group-prefs.cc	Sat Jul  5 08:21:20 2008
@@ -25,7 +25,7 @@
 #include <iostream>
 #include <fstream>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include "group-prefs.h"
 
 using namespace pan;
@@ -168,10 +168,10 @@
 
 namespace
 {
-  void end_element (GMarkupParseContext *context,
+  void end_element (GMarkupParseContext *,
                     const gchar         *element_name,
-                    gpointer             user_data,
-                    GError             **error)
+                    gpointer             ,
+                    GError             **)
   {
     if (!strcmp (element_name, "group"))
       group.clear ();

Modified: trunk/pan/gui/gui.cc
==============================================================================
--- trunk/pan/gui/gui.cc	(original)
+++ trunk/pan/gui/gui.cc	Sat Jul  5 08:21:20 2008
@@ -29,7 +29,7 @@
 #include <pan/general/debug.h>
 #include <pan/general/e-util.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/usenet-utils/scorefile.h>
 #include <pan/tasks/task-article.h>
 #include <pan/tasks/task-groups.h>
@@ -87,7 +87,7 @@
   }
 
   void
-  parent_set_cb (GtkWidget * widget, GtkObject * old_parent, gpointer ui_manager_g)
+  parent_set_cb (GtkWidget * widget, GtkObject *, gpointer ui_manager_g)
   {
     GtkWidget * toplevel = gtk_widget_get_toplevel (widget);
     if (GTK_IS_WINDOW (toplevel))
@@ -115,7 +115,7 @@
 }
 
 void
-GUI :: add_widget (GtkUIManager * merge,
+GUI :: add_widget (GtkUIManager *,
                    GtkWidget    * widget,
                    gpointer       gui_g)
 {
@@ -140,12 +140,12 @@
   }
 }
 
-void GUI :: show_event_log_cb (GtkWidget * w, gpointer gui_gpointer)
+void GUI :: show_event_log_cb (GtkWidget *, gpointer gui_gpointer)
 {
   static_cast<GUI*>(gui_gpointer)->activate_action ("show-log-dialog");
 }
 
-void GUI :: show_task_window_cb (GtkWidget * w, gpointer gui_gpointer)
+void GUI :: show_task_window_cb (GtkWidget *, gpointer gui_gpointer)
 {
   static_cast<GUI*>(gui_gpointer)->activate_action ("show-task-window");
 }
@@ -473,7 +473,7 @@
 namespace
 {
   gboolean focus_in_cb (GtkWidget     * w,
-                        GdkEventFocus * unused,
+                        GdkEventFocus * ,
                         gpointer        accel_group_g)
   {
     GtkAccelGroup * accel_group = static_cast<GtkAccelGroup*>(accel_group_g);
@@ -482,7 +482,7 @@
   }
 
   gboolean focus_out_cb (GtkWidget     * w,
-                         GdkEventFocus * unused,
+                         GdkEventFocus * ,
                          gpointer        accel_group_g)
   {
     GtkAccelGroup * accel_group = static_cast<GtkAccelGroup*>(accel_group_g);
@@ -680,7 +680,7 @@
 
 namespace
 {
-  void task_pane_destroyed_cb (GtkWidget * w, gpointer p)
+  void task_pane_destroyed_cb (GtkWidget *, gpointer p)
   {
     TaskPane ** task_pane (static_cast<TaskPane**>(p));
     *task_pane = 0;
@@ -919,7 +919,7 @@
 
 // this queues up a grouplist task for any servers that
 // were added while the server list dialog was up.
-void GUI :: server_list_dialog_destroyed (GtkWidget * w)
+void GUI :: server_list_dialog_destroyed (GtkWidget *)
 {
   quarks_t empty_servers, all_servers (_data.get_servers());
   foreach_const (quarks_t, all_servers, it) {
@@ -1295,11 +1295,11 @@
 
   enum { HORIZONTAL, VERTICAL };
 
-  void hpane_destroy_cb (GtkWidget * w, gpointer user_data)
+  void hpane_destroy_cb (GtkWidget *, gpointer)
   {
     std::cerr << LINE_ID << std::endl;
   }
-  void vpane_destroy_cb (GtkWidget * w, gpointer user_data)
+  void vpane_destroy_cb (GtkWidget *, gpointer)
   {
     std::cerr << LINE_ID << std::endl;
   }
@@ -1341,7 +1341,7 @@
 }
 
 void
-GUI :: notebook_page_switched_cb (GtkNotebook * notebook, GtkNotebookPage * page, gint page_num, gpointer user_data)
+GUI :: notebook_page_switched_cb (GtkNotebook *, GtkNotebookPage *, gint page_num, gpointer user_data)
 {
   GUI * gui = static_cast<GUI*>(user_data);
   GtkWidget * w;
@@ -1453,11 +1453,11 @@
   _group_pane->set_name_collapse (b);
 }
 
-void GUI :: do_match_only_unread_articles (bool b) { _header_pane->refilter (); }
-void GUI :: do_match_only_cached_articles (bool b) { _header_pane->refilter (); }
-void GUI :: do_match_only_binary_articles (bool b) { _header_pane->refilter (); }
-void GUI :: do_match_only_my_articles (bool b) { _header_pane->refilter (); }
-void GUI :: do_match_on_score_state (int state) { _header_pane->refilter (); }
+void GUI :: do_match_only_unread_articles (bool) { _header_pane->refilter (); }
+void GUI :: do_match_only_cached_articles (bool) { _header_pane->refilter (); }
+void GUI :: do_match_only_binary_articles (bool) { _header_pane->refilter (); }
+void GUI :: do_match_only_my_articles     (bool) { _header_pane->refilter (); }
+void GUI :: do_match_on_score_state       (int)  { _header_pane->refilter (); }
 
 void GUI :: do_show_matches (const Data::ShowType show_type)
 {
@@ -1770,7 +1770,7 @@
 }
 
 void
-GUI :: on_queue_task_active_changed (Queue& q, Task& t, bool is_active)
+GUI :: on_queue_task_active_changed (Queue&, Task& t, bool is_active)
 {
   // update our set of active tasks
   std::list<Task*>::iterator it (std::find (_active_tasks.begin(), _active_tasks.end(), &t));
@@ -1788,23 +1788,23 @@
     _views[i]->set_progress (0);
 }
 void
-GUI :: on_queue_connection_count_changed (Queue& q, int count)
+GUI :: on_queue_connection_count_changed (Queue&, int)
 {
   //connection_size = count;
   refresh_connection_label ();
 }
 void
-GUI :: on_queue_size_changed (Queue& q, int active, int total)
+GUI :: on_queue_size_changed (Queue&, int active, int total)
 {
   set_queue_size_label (active, total);
 }
 void
-GUI :: on_queue_online_changed (Queue& q, bool is_online)
+GUI :: on_queue_online_changed (Queue&, bool is_online)
 {
   toggle_action ("work-online", is_online);
 }
 void
-GUI :: on_queue_error (Queue& q, const StringView& message)
+GUI :: on_queue_error (Queue&, const StringView& message)
 {
   if (_queue.is_online())
   {
@@ -1822,7 +1822,7 @@
 
 
 void
-GUI :: on_prefs_flag_changed (const StringView& key, bool value)
+GUI :: on_prefs_flag_changed (const StringView&, bool)
 {
 }
 void

Modified: trunk/pan/gui/gui.h
==============================================================================
--- trunk/pan/gui/gui.h	(original)
+++ trunk/pan/gui/gui.h	Sat Jul  5 08:21:20 2008
@@ -64,10 +64,10 @@
       virtual void disable_accelerators_when_focused (GtkWidget * entry) const;
 
     public: // Prefs::Listener
-      virtual void on_prefs_flag_changed (const StringView& key, bool value);
-      virtual void on_prefs_int_changed (const StringView& key, int value) { }
+      virtual void on_prefs_flag_changed   (const StringView& key, bool value);
+      virtual void on_prefs_int_changed    (const StringView&,     int) { }
       virtual void on_prefs_string_changed (const StringView& key, const StringView& value);
-      virtual void on_prefs_color_changed (const StringView& key, const GdkColor& value) { }
+      virtual void on_prefs_color_changed  (const StringView&,     const GdkColor&) { }
 
     public: // PanUI
       virtual void do_prompt_for_charset ();
@@ -158,9 +158,9 @@
     private: // Queue::Listener
       friend class Queue;
       virtual void on_queue_task_active_changed (Queue&, Task&, bool active);
-      virtual void on_queue_tasks_added (Queue&, int index, int count) { }
-      virtual void on_queue_task_removed (Queue&, Task&, int pos) { }
-      virtual void on_queue_task_moved (Queue&, Task&, int new_pos, int old_pos) { }
+      virtual void on_queue_tasks_added (Queue&, int index UNUSED, int count UNUSED) { }
+      virtual void on_queue_task_removed (Queue&, Task&, int pos UNUSED) { }
+      virtual void on_queue_task_moved (Queue&, Task&, int new_pos UNUSED, int old_pos UNUSED) { }
       virtual void on_queue_connection_count_changed (Queue&, int count);
       virtual void on_queue_size_changed (Queue&, int active, int total);
       virtual void on_queue_online_changed (Queue&, bool online);

Modified: trunk/pan/gui/header-pane.cc
==============================================================================
--- trunk/pan/gui/header-pane.cc	(original)
+++ trunk/pan/gui/header-pane.cc	Sat Jul  5 08:21:20 2008
@@ -27,9 +27,9 @@
 #include <algorithm>
 #include <pan/general/debug.h>
 #include <pan/general/e-util.h>
-#include <pan/general/foreach.h>
-#include <pan/general/quark.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
+#include <pan/general/quark.h>
 #include <pan/usenet-utils/filter-info.h>
 #include <pan/data/article.h>
 #include <pan/data/data.h>
@@ -102,7 +102,7 @@
     { icon_empty,                  0 }
   };
 
-  const int
+  int
   get_article_state (const Data& data, const Article * a)
   {
     int retval;
@@ -143,11 +143,11 @@
 
 
 void
-HeaderPane :: render_action (GtkTreeViewColumn * col,
+HeaderPane :: render_action (GtkTreeViewColumn * ,
                              GtkCellRenderer   * renderer,
                              GtkTreeModel      * model,
                              GtkTreeIter       * iter,
-                             gpointer            user_data)
+                             gpointer            )
 {
   int index (0);
   gtk_tree_model_get (model, iter, COL_ACTION, &index, -1);
@@ -155,11 +155,11 @@
 }
 
 void
-HeaderPane :: render_state (GtkTreeViewColumn * col,
+HeaderPane :: render_state (GtkTreeViewColumn * ,
                             GtkCellRenderer   * renderer,
                             GtkTreeModel      * model,
                             GtkTreeIter       * iter,
-                            gpointer            user_data)
+                            gpointer            )
 {
   int index (0);
   gtk_tree_model_get (model, iter, COL_STATE, &index, -1);
@@ -181,7 +181,7 @@
 }
 
 void
-HeaderPane :: render_score (GtkTreeViewColumn * col,
+HeaderPane :: render_score (GtkTreeViewColumn * ,
                             GtkCellRenderer   * renderer,
                             GtkTreeModel      * model,
                             GtkTreeIter       * iter,
@@ -230,11 +230,11 @@
 }
 
 void
-HeaderPane :: render_bytes (GtkTreeViewColumn * col,
+HeaderPane :: render_bytes (GtkTreeViewColumn * ,
                             GtkCellRenderer   * renderer,
                             GtkTreeModel      * model,
                             GtkTreeIter       * iter,
-                            gpointer            user_data)
+                            gpointer            )
 {
   unsigned long bytes (0);
   gtk_tree_model_get (model, iter, COL_BYTES, &bytes, -1);
@@ -249,8 +249,8 @@
   CountUnread (const Row* top): top_row(top), unread_children(0) {}
   virtual ~CountUnread () {}
 
-  virtual bool operator()(PanTreeStore* store, PanTreeStore::Row* r,
-                          GtkTreeIter* iter, GtkTreePath* unused) {
+  virtual bool operator()(PanTreeStore*, PanTreeStore::Row* r,
+                          GtkTreeIter*, GtkTreePath* ) {
     const Row * row (dynamic_cast<Row*>(r));
     if (row!=top_row && !row->is_read)
       ++unread_children;
@@ -259,7 +259,7 @@
 };
 
 void
-HeaderPane :: render_subject (GtkTreeViewColumn * col,
+HeaderPane :: render_subject (GtkTreeViewColumn * ,
                               GtkCellRenderer   * renderer,
                               GtkTreeModel      * model,
                               GtkTreeIter       * iter,
@@ -358,7 +358,7 @@
 HeaderPane :: column_compare_func (GtkTreeModel  * model,
                                    GtkTreeIter   * iter_a,
                                    GtkTreeIter   * iter_b,
-                                   gpointer        userdata)
+                                   gpointer        )
 {
   int ret (0);
   const PanTreeStore * store (reinterpret_cast<PanTreeStore*>(model));
@@ -436,7 +436,7 @@
 PanTreeStore*
 HeaderPane :: build_model (const Quark               & group,
                            Data::ArticleTree         * atree,
-                           const TextMatch           * match)
+                           const TextMatch           * )
 {
   PanTreeStore * store = PanTreeStore :: new_tree (
     N_COLUMNS,
@@ -609,7 +609,7 @@
     quarks_t& mids;
     RememberMessageId (quarks_t& m): mids(m) {}
     virtual ~RememberMessageId() {}
-    virtual void operator() (GtkTreeModel* model, GtkTreeIter* it, const Article& article) {
+    virtual void operator() (GtkTreeModel*, GtkTreeIter*, const Article& article) {
       mids.insert (article.message_id);
     }
   };
@@ -747,7 +747,7 @@
 
 void
 HeaderPane :: get_full_selection_v_foreach (GtkTreeModel * model,
-                                            GtkTreePath  * path,
+                                            GtkTreePath  * ,
                                             GtkTreeIter  * iter,
                                             gpointer       data)
 {
@@ -837,7 +837,7 @@
 ****/
 
 void
-HeaderPane ::  do_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer pane_g)
+HeaderPane ::  do_popup_menu (GtkWidget*, GdkEventButton *event, gpointer pane_g)
 {
   HeaderPane * self (static_cast<HeaderPane*>(pane_g));
   GtkWidget * menu (self->_action_manager.get_action_widget ("/header-pane-popup"));
@@ -858,14 +858,14 @@
 {
   bool row_collapsed_or_expanded (false);
 
-  void row_collapsed_cb (GtkTreeView *view, GtkTreeIter *iter,
-                         GtkTreePath *path, gpointer unused)
+  void row_collapsed_cb (GtkTreeView *, GtkTreeIter *,
+                         GtkTreePath *, gpointer )
   {
     row_collapsed_or_expanded = true;
   }
 
-  void row_expanded_cb (GtkTreeView *view, GtkTreeIter *iter,
-                        GtkTreePath *path, gpointer unused)
+  void row_expanded_cb (GtkTreeView *view, GtkTreeIter *,
+                        GtkTreePath *path, gpointer )
   {
     row_collapsed_or_expanded = true;
     gtk_tree_view_expand_row (view, path, true);
@@ -992,9 +992,9 @@
 }
 
 void
-HeaderPane :: on_row_activated (GtkTreeView          * treeview,
-                                GtkTreePath          * path,
-                                GtkTreeViewColumn    * col,
+HeaderPane :: on_row_activated (GtkTreeView          * ,
+                                GtkTreePath          * ,
+                                GtkTreeViewColumn    * ,
                                 gpointer               pane_g)
 {
   g_idle_add (on_row_activated_idle, pane_g);
@@ -1184,8 +1184,8 @@
   }
 
   gboolean search_entry_focus_in_cb (GtkWidget     * w,
-                                     GdkEventFocus * unused1,
-                                     gpointer        unused2)
+                                     GdkEventFocus * ,
+                                     gpointer        )
   {
     gtk_widget_modify_text (w, GTK_STATE_NORMAL, NULL); // resets
     set_search_entry (w, search_text.c_str());
@@ -1205,8 +1205,8 @@
   }
 
   gboolean search_entry_focus_out_cb (GtkWidget     * w,
-                                      GdkEventFocus * unused1,
-                                      gpointer        unused2)
+                                      GdkEventFocus * ,
+                                      gpointer        )
   {
     refresh_search_entry (w);
     return false;
@@ -1226,7 +1226,7 @@
     }
   }
 
-  void search_entry_activated (GtkEntry * entry, gpointer h_gpointer)
+  void search_entry_activated (GtkEntry *, gpointer h_gpointer)
   {
     search_activate (static_cast<HeaderPane*>(h_gpointer));
     remove_activate_soon_tag ();
@@ -1271,13 +1271,13 @@
     }
   }
 
-  void entry_icon_released (SexyIconEntry *entry, SexyIconEntryPosition icon_pos, int button, gpointer menu)
+  void entry_icon_released (SexyIconEntry*, SexyIconEntryPosition icon_pos, int, gpointer menu)
   {
     if (icon_pos == SEXY_ICON_ENTRY_PRIMARY)
       gtk_menu_popup (GTK_MENU(menu), 0, 0, 0, 0, 0, gtk_get_current_event_time());
   }
 
-  void entry_icon_released_2 (SexyIconEntry *entry, SexyIconEntryPosition icon_pos, int button, gpointer pane_gpointer)
+  void entry_icon_released_2 (SexyIconEntry *entry, SexyIconEntryPosition icon_pos, int, gpointer pane_gpointer)
   {
     if (icon_pos == SEXY_ICON_ENTRY_SECONDARY) {
       set_search_entry (GTK_WIDGET(entry), "");
@@ -1525,7 +1525,7 @@
 }
 
 void
-HeaderPane :: on_selection_changed (GtkTreeSelection * sel, gpointer self_gpointer)
+HeaderPane :: on_selection_changed (GtkTreeSelection*, gpointer self_gpointer)
 {
   HeaderPane * self (static_cast<HeaderPane*>(self_gpointer));
 
@@ -1767,7 +1767,7 @@
   struct ArticleExists: public ArticleTester {
     virtual ~ArticleExists() {}
     ArticleExists () {}
-    virtual bool operator()(const Article& a) const { return true; }
+    virtual bool operator()(const Article&) const { return true; }
   };
 
   struct ArticleIsParentOf: public ArticleTester {
@@ -1826,7 +1826,7 @@
     virtual ~SelectFunctor () {}
     SelectFunctor (GtkTreeView * view): _view(view) {}
     GtkTreeView * _view;
-    virtual void operator() (GtkTreeModel* model, GtkTreeIter* iter, const Article& a) {
+    virtual void operator() (GtkTreeModel* model, GtkTreeIter* iter, const Article&) {
       GtkTreeSelection * sel (gtk_tree_view_get_selection (_view));
       gtk_tree_selection_unselect_all (sel);
       GtkTreePath * path = gtk_tree_model_get_path (model, iter);
@@ -2001,7 +2001,7 @@
 }
 
 void
-HeaderPane :: on_prefs_flag_changed (const StringView& key, bool value)
+HeaderPane :: on_prefs_flag_changed (const StringView& key, bool)
 {
   if (key == "header-pane-font-enabled")
     refresh_font ();
@@ -2010,7 +2010,7 @@
 }
 
 void
-HeaderPane :: on_prefs_string_changed (const StringView& key, const StringView& value)
+HeaderPane :: on_prefs_string_changed (const StringView& key, const StringView&)
 {
   if (key == "header-pane-font")
     refresh_font ();
@@ -2043,7 +2043,7 @@
 }
 
 void
-HeaderPane :: on_queue_task_removed (Queue& queue, Task& task, int index)
+HeaderPane :: on_queue_task_removed (Queue&, Task& task, int)
 {
   const TaskArticle * ta (dynamic_cast<const TaskArticle*>(&task));
   if (ta)
@@ -2076,8 +2076,8 @@
     SimilarWalk (GtkTreeSelection * s, const Article& a): selection(s), source(a) {}
 
   public:
-    virtual bool operator()(PanTreeStore * store, PanTreeStore::Row * row,
-			    GtkTreeIter * iter, GtkTreePath * unused) {
+    virtual bool operator()(PanTreeStore * store, PanTreeStore::Row *,
+			    GtkTreeIter * iter, GtkTreePath *) {
       const Article * article (get_article (GTK_TREE_MODEL(store), iter));
       if (similar (*article))
 	gtk_tree_selection_select_iter (selection, iter);

Modified: trunk/pan/gui/header-pane.h
==============================================================================
--- trunk/pan/gui/header-pane.h	(original)
+++ trunk/pan/gui/header-pane.h	Sat Jul  5 08:21:20 2008
@@ -22,6 +22,7 @@
 
 #include <gtk/gtk.h>
 #include <pan/general/e-util.h>
+#include <pan/general/macros.h> // for UNUSED
 #include <pan/data/article-cache.h>
 #include <pan/data/data.h>
 #include <pan/usenet-utils/filter-info.h>
@@ -136,14 +137,14 @@
       virtual void on_prefs_color_changed  (const StringView&, const GdkColor&) {}
 
     private:
-      virtual void on_queue_task_active_changed (Queue&, Task&, bool active) { }
+      virtual void on_queue_task_active_changed (Queue&, Task&, bool active UNUSED) { }
       virtual void on_queue_tasks_added (Queue&, int index, int count);
       virtual void on_queue_task_removed (Queue&, Task&, int index);
-      virtual void on_queue_task_moved (Queue&, Task&, int new_index, int old_index) { }
-      virtual void on_queue_connection_count_changed (Queue&, int count) { }
-      virtual void on_queue_size_changed (Queue&, int active, int total) { }
-      virtual void on_queue_online_changed (Queue&, bool online) { }
-      virtual void on_queue_error (Queue&, const StringView& message) { }
+      virtual void on_queue_task_moved (Queue&, Task&, int new_index UNUSED, int old_index UNUSED) { }
+      virtual void on_queue_connection_count_changed (Queue&, int count UNUSED) { }
+      virtual void on_queue_size_changed (Queue&, int active UNUSED, int total UNUSED) { }
+      virtual void on_queue_online_changed (Queue&, bool online UNUSED) { }
+      virtual void on_queue_error (Queue&, const StringView& message UNUSED) { }
 
     private:
       virtual void on_cache_added (const Quark& mid);

Modified: trunk/pan/gui/log-ui.cc
==============================================================================
--- trunk/pan/gui/log-ui.cc	(original)
+++ trunk/pan/gui/log-ui.cc	Sat Jul  5 08:21:20 2008
@@ -24,8 +24,8 @@
   #include <glib/gi18n.h>
   #include <gtk/gtk.h>
 }
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/string-view.h>
 #include "log-ui.h"
 #include "pad.h"
@@ -71,7 +71,7 @@
 namespace
 {
   void
-  log_response_cb (GtkDialog * dialog, int response, gpointer unused)
+  log_response_cb (GtkDialog * dialog, int response, gpointer )
   {
     if (response == GTK_RESPONSE_NO)
     {
@@ -135,7 +135,7 @@
 namespace
 {
   void
-  render_severity (GtkTreeViewColumn * col,
+  render_severity (GtkTreeViewColumn * ,
                    GtkCellRenderer   * renderer,
                    GtkTreeModel      * model,
                    GtkTreeIter       * iter,
@@ -148,11 +148,11 @@
   }
 
   void
-  render_date (GtkTreeViewColumn * col,
+  render_date (GtkTreeViewColumn * ,
                GtkCellRenderer   * renderer,
                GtkTreeModel      * model,
                GtkTreeIter       * iter,
-               gpointer            user_data)
+               gpointer            )
   {
     unsigned long date_ul;
     gtk_tree_model_get (model, iter, COL_DATE, &date_ul, -1);

Modified: trunk/pan/gui/pan-tree.cc
==============================================================================
--- trunk/pan/gui/pan-tree.cc	(original)
+++ trunk/pan/gui/pan-tree.cc	Sat Jul  5 08:21:20 2008
@@ -24,7 +24,7 @@
 #include <set>
 #include <gobject/gvaluecollector.h>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include "pan-tree.h"
 
 #define IS_SORTED(tree) \
@@ -149,7 +149,7 @@
 *****/
 
 GtkTreeModelFlags
-PanTreeStore :: model_get_flags (GtkTreeModel *tree_model)
+PanTreeStore :: model_get_flags (GtkTreeModel *)
 {
   return GTK_TREE_MODEL_ITERS_PERSIST;
 }
@@ -587,7 +587,7 @@
   PanTreeStore * store;
   FreeRowWalker (PanTreeStore *t): store(t) {}
   virtual ~FreeRowWalker () {}
-  virtual bool operator()(PanTreeStore *s, Row *r, GtkTreeIter*it, GtkTreePath *p) {
+  virtual bool operator()(PanTreeStore *s, Row *r, GtkTreeIter*, GtkTreePath*) {
     if (store->row_dispose)
         store->row_dispose->row_dispose (s, r);
     else
@@ -666,7 +666,7 @@
 namespace
 {
   class RootRow: public PanTreeStore::Row {
-    virtual void get_value (int column, GValue * setme) { /* unused */ }
+    virtual void get_value (int, GValue *) { /* unused */ }
   };
 }
 
@@ -1152,8 +1152,8 @@
   }
 
   virtual bool operator()(PanTreeStore* store,
-                          PanTreeStore::Row* row,
-                          GtkTreeIter* iter, GtkTreePath* path)
+                          PanTreeStore::Row*,
+                          GtkTreeIter* iter, GtkTreePath*)
   {
     clear_children (store, store->get_row(iter));
     return true;

Modified: trunk/pan/gui/pan.cc
==============================================================================
--- trunk/pan/gui/pan.cc	(original)
+++ trunk/pan/gui/pan.cc	Sat Jul  5 08:21:20 2008
@@ -68,7 +68,7 @@
       gtk_main_quit ();
   }
 
-  gboolean delete_event_cb (GtkWidget *w, GdkEvent *e, gpointer user_data)
+  gboolean delete_event_cb (GtkWidget *, GdkEvent *, gpointer )
   {
     mainloop_quit ();
     return true; // don't invoke the default handler that destroys the widget
@@ -92,7 +92,7 @@
 #endif // G_OS_WIN32
   }
 
-  void destroy_cb (GtkWidget*w, gpointer user_data)
+  void destroy_cb (GtkWidget*, gpointer)
   {
     gtk_main_quit ();
   }
@@ -103,7 +103,7 @@
     Queue * queue;
   };
 
-  void add_grouplist_task (GtkObject *object, gpointer user_data)
+  void add_grouplist_task (GtkObject *, gpointer user_data)
   {
     DataAndQueue * foo (static_cast<DataAndQueue*>(user_data));
     const quarks_t new_servers (foo->data->get_servers());

Modified: trunk/pan/gui/post-ui.cc
==============================================================================
--- trunk/pan/gui/post-ui.cc	(original)
+++ trunk/pan/gui/post-ui.cc	Sat Jul  5 08:21:20 2008
@@ -31,8 +31,8 @@
 }
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/utf8-utils.h>
 #include <pan/usenet-utils/gnksa.h>
 #include <pan/usenet-utils/message-check.h>
@@ -66,7 +66,7 @@
 {
   bool remember_charsets (true);
 
-  void on_remember_charset_toggled (GtkToggleAction * toggle, gpointer post_g)
+  void on_remember_charset_toggled (GtkToggleAction * toggle, gpointer)
   {
     remember_charsets = gtk_toggle_action_get_active (toggle);
   }
@@ -181,17 +181,17 @@
 {
   GtkWidget* get_focus (gpointer p) { return gtk_window_get_focus(GTK_WINDOW(static_cast<PostUI*>(p)->root())); }
 
-  void do_cut      (GtkAction * w, gpointer p) { g_signal_emit_by_name (get_focus(p), "cut_clipboard"); }
-  void do_copy     (GtkAction * w, gpointer p) { g_signal_emit_by_name (get_focus(p), "copy_clipboard"); }
-  void do_paste    (GtkAction * w, gpointer p) { g_signal_emit_by_name (get_focus(p), "paste_clipboard"); }
-  void do_rot13    (GtkAction * w, gpointer p) { static_cast<PostUI*>(p)->rot13_selection(); }
-  void do_edit     (GtkAction * w, gpointer p) { static_cast<PostUI*>(p)->spawn_editor (); }
-  void do_profiles (GtkAction * w, gpointer p) { static_cast<PostUI*>(p)->manage_profiles (); }
-  void do_send     (GtkAction * w, gpointer p) { static_cast<PostUI*>(p)->send_now (); }
-  void do_save     (GtkAction * w, gpointer p) { static_cast<PostUI*>(p)->save_draft (); }
-  void do_open     (GtkAction * w, gpointer p) { static_cast<PostUI*>(p)->open_draft (); }
-  void do_charset  (GtkAction * w, gpointer p) { static_cast<PostUI*>(p)->prompt_for_charset (); }
-  void do_close    (GtkAction * w, gpointer p) { static_cast<PostUI*>(p)->close_window (); }
+  void do_cut      (GtkAction*, gpointer p) { g_signal_emit_by_name (get_focus(p), "cut_clipboard"); }
+  void do_copy     (GtkAction*, gpointer p) { g_signal_emit_by_name (get_focus(p), "copy_clipboard"); }
+  void do_paste    (GtkAction*, gpointer p) { g_signal_emit_by_name (get_focus(p), "paste_clipboard"); }
+  void do_rot13    (GtkAction*, gpointer p) { static_cast<PostUI*>(p)->rot13_selection(); }
+  void do_edit     (GtkAction*, gpointer p) { static_cast<PostUI*>(p)->spawn_editor (); }
+  void do_profiles (GtkAction*, gpointer p) { static_cast<PostUI*>(p)->manage_profiles (); }
+  void do_send     (GtkAction*, gpointer p) { static_cast<PostUI*>(p)->send_now (); }
+  void do_save     (GtkAction*, gpointer p) { static_cast<PostUI*>(p)->save_draft (); }
+  void do_open     (GtkAction*, gpointer p) { static_cast<PostUI*>(p)->open_draft (); }
+  void do_charset  (GtkAction*, gpointer p) { static_cast<PostUI*>(p)->prompt_for_charset (); }
+  void do_close    (GtkAction*, gpointer p) { static_cast<PostUI*>(p)->close_window (); }
   void do_wrap     (GtkToggleAction * w, gpointer p) { static_cast<PostUI*>(p)->set_wrap_mode (gtk_toggle_action_get_active (w)); }
   void do_edit2    (GtkToggleAction * w, gpointer p) { static_cast<PostUI*>(p)->set_always_run_editor (gtk_toggle_action_get_active (w)); }
 
@@ -223,7 +223,7 @@
     { "spellcheck", NULL, N_("Check _Spelling"), NULL, NULL, G_CALLBACK(on_spellcheck_toggled), true }
   };
 
-  void add_widget (GtkUIManager* merge, GtkWidget* widget, gpointer vbox)
+  void add_widget (GtkUIManager*, GtkWidget* widget, gpointer vbox)
   {
     if (GTK_IS_TOOLBAR (widget)) {
       GtkWidget * handle_box = gtk_handle_box_new ();
@@ -318,7 +318,7 @@
 
 namespace
 {
-  gboolean delete_event_cb (GtkWidget *w, GdkEvent *e, gpointer user_data)
+  gboolean delete_event_cb (GtkWidget*, GdkEvent*, gpointer user_data)
   {
     static_cast<PostUI*>(user_data)->close_window ();
     return true; // don't invoke the default handler that destroys the widget
@@ -505,9 +505,9 @@
       for (int i='0'; i<='9'; ++i) keep.insert(i); // always okay
       for (int i='a'; i<='z'; ++i) keep.insert(i); // always okay
       for (int i='A'; i<='Z'; ++i) keep.insert(i); // always okay
-      for (char *pch="$-_.+!*'(),"; *pch; ++pch) keep.insert(*pch); // okay in the right context
-      for (char *pch="$&+,/:;=?@"; *pch; ++pch) keep.erase(*pch); // reserved
-      for (char *pch="()"; *pch; ++pch) keep.erase(*pch); // gives thunderbird problems?
+      for (const char *pch="$-_.+!*'(),"; *pch; ++pch) keep.insert(*pch); // okay in the right context
+      for (const char *pch="$&+,/:;=?@"; *pch; ++pch) keep.erase(*pch); // reserved
+      for (const char *pch="()"; *pch; ++pch) keep.erase(*pch); // gives thunderbird problems?
     }
 
     std::string out;
@@ -1449,7 +1449,7 @@
     delete static_cast<PostUI*>(p);
   }
 
-  void on_from_combo_changed (GtkComboBox *widget, gpointer user_data)
+  void on_from_combo_changed (GtkComboBox*, gpointer user_data)
   {
     static_cast<PostUI*>(user_data)->apply_profile ();
   }
@@ -1569,7 +1569,7 @@
  * will work properly.
  */
 void
-PostUI :: body_view_realized_cb (GtkWidget * w, gpointer self_gpointer)
+PostUI :: body_view_realized_cb (GtkWidget*, gpointer self_gpointer)
 {
   PostUI * self = static_cast<PostUI*>(self_gpointer);
   self->set_wrap_mode (self->_prefs.get_flag ("compose-wrap-enabled", true));
@@ -1613,7 +1613,7 @@
 }
 
 void
-PostUI :: group_entry_changed_cb (GtkEditable * w, gpointer ui_gpointer)
+PostUI :: group_entry_changed_cb (GtkEditable*, gpointer ui_gpointer)
 {
   PostUI * ui (static_cast<PostUI*>(ui_gpointer));
   unsigned int& tag (ui->_group_entry_changed_idle_tag);
@@ -1627,7 +1627,7 @@
 
 namespace
 {
-  static void render_from (GtkCellLayout    * cell_layout,
+  static void render_from (GtkCellLayout    * ,
                            GtkCellRenderer  * renderer,
                            GtkTreeModel     * model,
                            GtkTreeIter      * iter,

Modified: trunk/pan/gui/prefs-ui.cc
==============================================================================
--- trunk/pan/gui/prefs-ui.cc	(original)
+++ trunk/pan/gui/prefs-ui.cc	Sat Jul  5 08:21:20 2008
@@ -23,7 +23,7 @@
   #include <gtk/gtk.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/icons/pan-pixbufs.h>
 #include "hig.h"
 #include "pad.h"
@@ -54,7 +54,7 @@
   }
 #endif
 
-  void response_cb (GtkDialog * dialog, int response, gpointer unused)
+  void response_cb (GtkDialog * dialog, int, gpointer)
   {
     gtk_widget_destroy (GTK_WIDGET(dialog));
   }
@@ -299,7 +299,7 @@
     return s;
   }
 
-  void header_column_up_cb (GtkButton * b, gpointer user_data)
+  void header_column_up_cb (GtkButton *, gpointer user_data)
   {
     HeaderColInfo& info (*static_cast<HeaderColInfo*>(user_data));
     GtkTreeIter sel_iter;
@@ -314,7 +314,7 @@
     gtk_tree_path_free (path);
   }
 
-  void header_column_down_cb (GtkButton * b, gpointer user_data)
+  void header_column_down_cb (GtkButton *, gpointer user_data)
   {
     HeaderColInfo& info (*static_cast<HeaderColInfo*>(user_data));
     GtkTreeIter sel_iter;
@@ -326,7 +326,7 @@
     }
   }
 
-  void header_col_enabled_toggled_cb (GtkCellRendererToggle * cell,
+  void header_col_enabled_toggled_cb (GtkCellRendererToggle * ,
 	                              gchar                 * path_str,
 	                              gpointer                user_data)
   {

Modified: trunk/pan/gui/prefs.cc
==============================================================================
--- trunk/pan/gui/prefs.cc	(original)
+++ trunk/pan/gui/prefs.cc	Sat Jul  5 08:21:20 2008
@@ -28,20 +28,20 @@
   #include <glib/gi18n.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include "prefs.h"
 
 using namespace pan;
 
 // called for open tags <foo bar='baz'>
 void
-Prefs :: start_element (GMarkupParseContext *context,
+Prefs :: start_element (GMarkupParseContext *,
                         const gchar         *element_name,
                         const gchar        **attribute_names,
                         const gchar        **attribute_vals,
                         gpointer             prefs_gpointer,
-                        GError             **error)
+                        GError             **)
 {
   const std::string s (element_name);
   Prefs& prefs (*static_cast<Prefs*>(prefs_gpointer));

Modified: trunk/pan/gui/profiles-dialog.cc
==============================================================================
--- trunk/pan/gui/profiles-dialog.cc	(original)
+++ trunk/pan/gui/profiles-dialog.cc	Sat Jul  5 08:21:20 2008
@@ -28,7 +28,7 @@
   #include <gtk/gtk.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/usenet-utils/gnksa.h>
 #include "hig.h"
 #include "pad.h"
@@ -419,14 +419,14 @@
 
 namespace
 {
-  void profiles_tree_view_selection_changed_cb (GtkTreeSelection * selection, gpointer user_data)
+  void profiles_tree_view_selection_changed_cb (GtkTreeSelection *, gpointer user_data)
   {
     ProfilesDialog *d = (ProfilesDialog *)user_data;
     d->refresh_buttons ();
   }
-  void tree_view_row_activated_cb (GtkTreeView        * view,
-                                   GtkTreePath        * path,
-                                   GtkTreeViewColumn  * col,
+  void tree_view_row_activated_cb (GtkTreeView        * ,
+                                   GtkTreePath        * ,
+                                   GtkTreeViewColumn  * ,
                                    gpointer             user_data)
   {
     on_edit_button (NULL, user_data);

Modified: trunk/pan/gui/progress-view.cc
==============================================================================
--- trunk/pan/gui/progress-view.cc	(original)
+++ trunk/pan/gui/progress-view.cc	Sat Jul  5 08:21:20 2008
@@ -86,7 +86,7 @@
        _progress_step_idle_tag = g_timeout_add (333, on_progress_step_idle, this);
 }
 void
-ProgressView :: on_progress_step (Progress& p, int of_100)
+ProgressView :: on_progress_step (Progress&, int)
 {
   update_percentage_soon ();
 }
@@ -104,7 +104,7 @@
 }
 
 void
-ProgressView :: on_progress_status (Progress& p, const StringView& s)
+ProgressView :: on_progress_status (Progress&, const StringView&)
 {
   update_text_soon ();
 }

Modified: trunk/pan/gui/progress-view.h
==============================================================================
--- trunk/pan/gui/progress-view.h	(original)
+++ trunk/pan/gui/progress-view.h	Sat Jul  5 08:21:20 2008
@@ -48,7 +48,7 @@
       virtual void on_progress_step (Progress&, int percentage);
       virtual void on_progress_status (Progress&, const StringView&);
       virtual void on_progress_error (Progress&, const StringView&);
-      virtual void on_progress_finished (Progress&, int status) { }
+      virtual void on_progress_finished (Progress&, int) { }
 
     private:
       void update_text_soon ();

Modified: trunk/pan/gui/save-ui.cc
==============================================================================
--- trunk/pan/gui/save-ui.cc	(original)
+++ trunk/pan/gui/save-ui.cc	Sat Jul  5 08:21:20 2008
@@ -23,7 +23,7 @@
   #include <gtk/gtk.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/icons/pan-pixbufs.h>
 #include <pan/tasks/task-article.h>
 #include <pan/tasks/queue.h>
@@ -144,7 +144,7 @@
 
 namespace
 {
-  void entry_changed_cb (GtkEditable * ignored, gpointer radio_or_null)
+  void entry_changed_cb (GtkEditable*, gpointer radio_or_null)
   {
     if (radio_or_null)
       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(radio_or_null), true);

Modified: trunk/pan/gui/score-view-ui.cc
==============================================================================
--- trunk/pan/gui/score-view-ui.cc	(original)
+++ trunk/pan/gui/score-view-ui.cc	Sat Jul  5 08:21:20 2008
@@ -84,7 +84,7 @@
 }
 
 void
-ScoreView :: add_destroy_cb (GtkObject* unused, gpointer view_gpointer)
+ScoreView :: add_destroy_cb (GtkObject*, gpointer view_gpointer)
 {
   static_cast<ScoreView*>(view_gpointer)->tree_view_refresh ();
 }
@@ -96,7 +96,7 @@
   gtk_widget_show (add->root());
 }
 void
-ScoreView :: add_clicked_cb (GtkWidget * button, gpointer view_gpointer)
+ScoreView :: add_clicked_cb (GtkWidget*, gpointer view_gpointer)
 {
   static_cast<ScoreView*>(view_gpointer)->on_add ();
 }
@@ -118,7 +118,7 @@
 }
 
 void
-ScoreView :: remove_clicked_cb (GtkWidget * button, gpointer view_gpointer)
+ScoreView :: remove_clicked_cb (GtkWidget*, gpointer view_gpointer)
 {
   static_cast<ScoreView*>(view_gpointer)->on_remove ();
 }

Modified: trunk/pan/gui/server-ui.cc
==============================================================================
--- trunk/pan/gui/server-ui.cc	(original)
+++ trunk/pan/gui/server-ui.cc	Sat Jul  5 08:21:20 2008
@@ -26,7 +26,7 @@
   #include <glib/gi18n.h>
   #include <gtk/gtk.h>
 }
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/quark.h>
 #include <pan/data/data.h>
 #include "server-ui.h"
@@ -82,7 +82,7 @@
   }
 
   void
-  edit_dialog_populate (Data& data, const Quark& server, ServerEditDialog * d)
+  edit_dialog_populate (Data&, const Quark& server, ServerEditDialog * d)
   {
     // sanity clause
     g_return_if_fail (d!=0);
@@ -403,7 +403,7 @@
   }
 
   void
-  server_list_dialog_response_cb (GtkDialog * dialog, int response, gpointer user_data)
+  server_list_dialog_response_cb (GtkDialog * dialog, int, gpointer)
   {
     gtk_widget_destroy (GTK_WIDGET(dialog));
   }
@@ -441,7 +441,7 @@
   }
 
   void
-  server_edit_dialog_destroy_cb (GtkWidget * w, gpointer user_data)
+  server_edit_dialog_destroy_cb (GtkWidget *, gpointer user_data)
   {
     if (GTK_IS_WIDGET (user_data))
     {
@@ -451,7 +451,7 @@
   }
 
   void
-  add_button_clicked_cb (GtkButton * button, gpointer user_data)
+  add_button_clicked_cb (GtkButton *, gpointer user_data)
   {
     const Quark empty_quark;
     GtkWidget * list_dialog = GTK_WIDGET (user_data);
@@ -462,7 +462,7 @@
   }
 
   void
-  edit_button_clicked_cb (GtkButton * button, gpointer user_data)
+  edit_button_clicked_cb (GtkButton *, gpointer user_data)
   {
     GtkWidget * list_dialog = GTK_WIDGET (user_data);
     ServerListDialog * d = (ServerListDialog*) g_object_get_data (G_OBJECT(list_dialog), "dialog");
@@ -475,13 +475,13 @@
   }
 
   void
-  server_tree_view_row_activated_cb (GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data)
+  server_tree_view_row_activated_cb (GtkTreeView*, GtkTreePath*, GtkTreeViewColumn*, gpointer user_data)
   {
     edit_button_clicked_cb (NULL, user_data);	
   }
 
   void
-  server_tree_view_selection_changed_cb (GtkTreeSelection * selection, gpointer user_data)
+  server_tree_view_selection_changed_cb (GtkTreeSelection*, gpointer user_data)
   {
     button_refresh ((ServerListDialog*)user_data);
   }

Modified: trunk/pan/gui/task-pane.cc
==============================================================================
--- trunk/pan/gui/task-pane.cc	(original)
+++ trunk/pan/gui/task-pane.cc	Sat Jul  5 08:21:20 2008
@@ -24,7 +24,7 @@
   #include <gtk/gtk.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/utf8-utils.h>
 #include <pan/tasks/queue.h>
 #include <pan/icons/pan-pixbufs.h>
@@ -47,7 +47,7 @@
 typedef Queue::tasks_t tasks_t;
 
 void
-TaskPane :: get_selected_tasks_foreach (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer list_g)
+TaskPane :: get_selected_tasks_foreach (GtkTreeModel *model, GtkTreePath *, GtkTreeIter *iter, gpointer list_g)
 {
   Task * task (0);
   gtk_tree_model_get (model, iter, COL_TASK_POINTER, &task, -1);
@@ -95,31 +95,31 @@
 {
   queue->set_online (gtk_toggle_button_get_active (b));
 }
-void TaskPane :: up_clicked_cb (GtkButton* b, TaskPane* pane)
+void TaskPane :: up_clicked_cb (GtkButton*, TaskPane* pane)
 {
   pane->_queue.move_up (pane->get_selected_tasks());
 }
-void TaskPane :: down_clicked_cb (GtkButton* b, TaskPane* pane)
+void TaskPane :: down_clicked_cb (GtkButton*, TaskPane* pane)
 {
   pane->_queue.move_down (pane->get_selected_tasks());
 }
-void TaskPane :: top_clicked_cb (GtkButton* b, TaskPane* pane)
+void TaskPane :: top_clicked_cb (GtkButton*, TaskPane* pane)
 {
   pane->_queue.move_top (pane->get_selected_tasks());
 }
-void TaskPane :: bottom_clicked_cb (GtkButton* b, TaskPane* pane)
+void TaskPane :: bottom_clicked_cb (GtkButton*, TaskPane* pane)
 {
   pane->_queue.move_bottom (pane->get_selected_tasks());
 }
-void TaskPane :: stop_clicked_cb (GtkButton* b, TaskPane* pane)
+void TaskPane :: stop_clicked_cb (GtkButton*, TaskPane* pane)
 {
   pane->_queue.stop_tasks (pane->get_selected_tasks());
 }
-void TaskPane :: delete_clicked_cb (GtkButton* b, TaskPane* pane)
+void TaskPane :: delete_clicked_cb (GtkButton*, TaskPane* pane)
 {
   pane->_queue.remove_tasks (pane->get_selected_tasks());
 }
-void TaskPane :: restart_clicked_cb (GtkButton* b, TaskPane* pane)
+void TaskPane :: restart_clicked_cb (GtkButton*, TaskPane* pane)
 {
   pane->_queue.restart_tasks (pane->get_selected_tasks());
 }
@@ -157,7 +157,7 @@
 }
 
 void
-TaskPane :: on_queue_task_removed (Queue& queue, Task& task, int index)
+TaskPane :: on_queue_task_removed (Queue&, Task& task, int index)
 {
   const int list_index (find_task_index (_store, &task));
   assert (list_index == index);
@@ -167,7 +167,7 @@
 }
 
 void
-TaskPane :: on_queue_task_moved (Queue& queue, Task& task, int new_index, int old_index)
+TaskPane :: on_queue_task_moved (Queue&, Task&, int new_index, int old_index)
 {
   const int count (gtk_tree_model_iter_n_children (GTK_TREE_MODEL(_store), NULL));
   std::vector<int> v (count);
@@ -182,9 +182,9 @@
   gtk_list_store_reorder (_store, &v.front());
 }
 
-void TaskPane :: on_queue_task_active_changed (Queue&, Task&, bool active) { }
-void TaskPane :: on_queue_connection_count_changed (Queue&, int count) { }
-void TaskPane :: on_queue_size_changed (Queue&, int active, int total) { }
+void TaskPane :: on_queue_task_active_changed (Queue&, Task&, bool) { }
+void TaskPane :: on_queue_connection_count_changed (Queue&, int) { }
+void TaskPane :: on_queue_size_changed (Queue&, int, int) { }
 
 void TaskPane :: on_queue_online_changed (Queue&, bool online)
 {
@@ -262,7 +262,7 @@
 
 gboolean
 TaskPane :: periodic_refresh_foreach (GtkTreeModel    * model,
-                                      GtkTreePath     * path,
+                                      GtkTreePath     * ,
                                       GtkTreeIter     * iter,
                                       gpointer          states_gpointer)
 {
@@ -299,7 +299,7 @@
 namespace
 {
   void
-  render_state (GtkTreeViewColumn *col,
+  render_state (GtkTreeViewColumn *,
                 GtkCellRenderer *rend,
                 GtkTreeModel *model,
                 GtkTreeIter *iter,

Modified: trunk/pan/gui/task-pane.h
==============================================================================
--- trunk/pan/gui/task-pane.h	(original)
+++ trunk/pan/gui/task-pane.h	Sat Jul  5 08:21:20 2008
@@ -48,7 +48,7 @@
       virtual void on_queue_connection_count_changed (Queue&, int count);
       virtual void on_queue_size_changed (Queue&, int active, int total);
       virtual void on_queue_online_changed (Queue&, bool online);
-      virtual void on_queue_error (Queue&, const StringView& message) { }
+      virtual void on_queue_error (Queue&, const StringView&) { }
 
     private:
       Queue& _queue;

Modified: trunk/pan/tasks/adaptable-set-test.cc
==============================================================================
--- trunk/pan/tasks/adaptable-set-test.cc	(original)
+++ trunk/pan/tasks/adaptable-set-test.cc	Sat Jul  5 08:21:20 2008
@@ -24,15 +24,15 @@
     int new_index_of_moved;
 
   public:
-    virtual void on_set_items_added (AdaptableSet<X, MyLessThan<X> >& s, std::vector<X>& i, int index) {
+    virtual void on_set_items_added (AdaptableSet<X, MyLessThan<X> >&, std::vector<X>& i, int index) {
       index_of_added = index;
       value = i[0];
     }
-    virtual void on_set_item_removed (AdaptableSet<X, MyLessThan<X> >& s, X& i, int index) {
+    virtual void on_set_item_removed (AdaptableSet<X, MyLessThan<X> >&, X& i, int index) {
       index_of_removed = index;
       value = i;
     }
-    virtual void on_set_item_moved (AdaptableSet<X, MyLessThan<X> >& s, X& i, int index, int old_index) {
+    virtual void on_set_item_moved (AdaptableSet<X, MyLessThan<X> >&, X& i, int index, int old_index) {
       old_index_of_moved = old_index;
       new_index_of_moved = index;
       value = i;

Modified: trunk/pan/tasks/adaptable-set.cc
==============================================================================
--- trunk/pan/tasks/adaptable-set.cc	(original)
+++ trunk/pan/tasks/adaptable-set.cc	Sat Jul  5 08:21:20 2008
@@ -26,7 +26,7 @@
 #include <ostream>
 #include <map>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/tasks/adaptable-set.h>
 
 using namespace pan;

Modified: trunk/pan/tasks/decoder.cc
==============================================================================
--- trunk/pan/tasks/decoder.cc	(original)
+++ trunk/pan/tasks/decoder.cc	Sat Jul  5 08:21:20 2008
@@ -33,7 +33,7 @@
 };
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/utf8-utils.h>
 #include "decoder.h"
 

Modified: trunk/pan/tasks/nntp-pool.cc
==============================================================================
--- trunk/pan/tasks/nntp-pool.cc	(original)
+++ trunk/pan/tasks/nntp-pool.cc	Sat Jul  5 08:21:20 2008
@@ -21,8 +21,8 @@
 #include <ctime>
 #include <glib/gi18n.h>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include "nntp-pool.h"
 
 using namespace pan;
@@ -152,7 +152,10 @@
 ***/
 
 void
-NNTP_Pool :: on_socket_created (const StringView& host, int port, bool ok, Socket* socket)
+NNTP_Pool :: on_socket_created (const StringView  & host UNUSED,
+                                int                 port UNUSED,
+                                bool                ok,
+                                Socket            * socket)
 {
   if (!ok)
   {
@@ -289,7 +292,9 @@
     public:
       NoopListener (NNTP::Source * s, bool b): source(s), hang_up(b) {}
       virtual ~NoopListener() {}
-      virtual void on_nntp_done  (NNTP * nntp, Health health, const StringView& response) {
+      virtual void on_nntp_done  (NNTP * nntp,
+                                  Health health,
+                                  const StringView& response UNUSED) {
         source->check_in (nntp, hang_up ? ERR_NETWORK : health);
         delete this;
       }

Modified: trunk/pan/tasks/nntp.cc
==============================================================================
--- trunk/pan/tasks/nntp.cc	(original)
+++ trunk/pan/tasks/nntp.cc	Sat Jul  5 08:21:20 2008
@@ -114,7 +114,7 @@
 ***/
 
 bool
-NNTP :: on_socket_response (Socket * sock, const StringView& line_in)
+NNTP :: on_socket_response (Socket * sock UNUSED, const StringView& line_in)
 {
    enum State { CMD_FAIL, CMD_DONE, CMD_MORE, CMD_NEXT, CMD_RETRY };
    State state;
@@ -290,13 +290,13 @@
 }
 
 void
-NNTP :: on_socket_abort (Socket * sock)
+NNTP :: on_socket_abort (Socket * sock UNUSED)
 {
    fire_done_func (ERR_NETWORK, StringView());
 }
 
 void
-NNTP :: on_socket_error (Socket * sock)
+NNTP :: on_socket_error (Socket * sock UNUSED)
 {
    _socket_error = true;
    fire_done_func (ERR_NETWORK, StringView());

Modified: trunk/pan/tasks/nntp.h
==============================================================================
--- trunk/pan/tasks/nntp.h	(original)
+++ trunk/pan/tasks/nntp.h	Sat Jul  5 08:21:20 2008
@@ -21,6 +21,7 @@
 #define __NNTP_h__
 
 #include <deque>
+#include <pan/general/macros.h> // for UNUSED
 #include <pan/general/quark.h>
 #include <pan/general/string-view.h>
 #include <pan/tasks/health.h>
@@ -60,8 +61,8 @@
          * such as a list of headers for an XOVER command or a list of
          * lines for an ARTICLE command.
          */
-        virtual void on_nntp_line  (NNTP               * nntp,
-                                    const StringView   & line) {}
+        virtual void on_nntp_line  (NNTP               * nntp UNUSED,
+                                    const StringView   & line UNUSED) {}
 
         /**
          * Called at the end of an NNTP command.  If the command was
@@ -74,18 +75,18 @@
          * @param health returns OK, ERR_NETWORK, or ERR_SERVER.
          *               ERR_LOCAL is never used here.
          */
-        virtual void on_nntp_done  (NNTP               * nntp,
-                                    Health               health,
-                                    const StringView   & response) {}
+        virtual void on_nntp_done  (NNTP               * nntp     UNUSED,
+                                    Health               health   UNUSED,
+                                    const StringView   & response UNUSED) {}
 
         /**
          * Called whenever an NNTP object sets the current group.
          */
-        virtual void on_nntp_group (NNTP               * nntp,
-                                    const Quark        & group,
-                                    unsigned long        estimated_qty,
-                                    unsigned long        low,
-                                    unsigned long        high) {}
+        virtual void on_nntp_group (NNTP               * nntp          UNUSED,
+                                    const Quark        & group         UNUSED,
+                                    unsigned long        estimated_qty UNUSED,
+                                    unsigned long        low           UNUSED,
+                                    unsigned long        high          UNUSED) {}
        };
 
       public:

Modified: trunk/pan/tasks/nzb-test.cc
==============================================================================
--- trunk/pan/tasks/nzb-test.cc	(original)
+++ trunk/pan/tasks/nzb-test.cc	Sat Jul  5 08:21:20 2008
@@ -11,7 +11,7 @@
 
 struct MyServerRank: public ServerRank
 {
-  virtual int get_server_rank (const Quark& server) const { return 1; }
+  virtual int get_server_rank (const Quark&) const { return 1; }
 };
 
 struct MyGroupServer: public GroupServer
@@ -19,7 +19,7 @@
   std::map<Quark,quarks_t>& g2s;
   MyGroupServer (std::map<Quark,quarks_t>& g): g2s(g) {}
   virtual ~MyGroupServer () {}
-  virtual void server_get_groups (const Quark& group, quarks_t& setme) const { /*ignored*/ }
+  virtual void server_get_groups (const Quark&, quarks_t&) const { /*ignored*/ }
   virtual void group_get_servers (const Quark& group, quarks_t& setme) const {
     setme.clear ();
     if (g2s.count (group))
@@ -30,9 +30,9 @@
 struct MyArticleRead: public ArticleRead
 {
   virtual ~MyArticleRead () {}
-  virtual bool is_read (const Article* a) const { return false; }
+  virtual bool is_read (const Article*) const { return false; }
   virtual void mark_read (const Article&, bool read=true) {}
-  virtual void mark_read (const Article** articles, unsigned long article_count, bool read=true) {}
+  virtual void mark_read (const Article**, unsigned long, bool read=true) {}
 };
 
 

Modified: trunk/pan/tasks/nzb.cc
==============================================================================
--- trunk/pan/tasks/nzb.cc	(original)
+++ trunk/pan/tasks/nzb.cc	Sat Jul  5 08:21:20 2008
@@ -27,8 +27,8 @@
 }
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/quark.h>
 #include <pan/general/string-view.h>
 #include <pan/general/utf8-utils.h>
@@ -72,12 +72,12 @@
   };
 
   // called for open tags <foo bar='baz'>
-  void start_element (GMarkupParseContext *context,
+  void start_element (GMarkupParseContext *context         UNUSED,
                       const gchar         *element_name,
                       const gchar        **attribute_names,
                       const gchar        **attribute_vals,
                       gpointer             user_data,
-                      GError             **error)
+                      GError             **error           UNUSED)
   {
     MyContext& mc (*static_cast<MyContext*>(user_data));
 
@@ -101,10 +101,10 @@
   }
 
   // Called for close tags </foo>
-  void end_element    (GMarkupParseContext *context,
+  void end_element    (GMarkupParseContext *context       UNUSED,
                        const gchar         *element_name,
                        gpointer             user_data,
-                       GError             **error)
+                       GError             **error         UNUSED)
   {
     MyContext& mc (*static_cast<MyContext*>(user_data));
 
@@ -139,11 +139,11 @@
     }
   }
 
-  void text (GMarkupParseContext *context,
+  void text (GMarkupParseContext *context    UNUSED,
              const gchar         *text,
              gsize                text_len,
              gpointer             user_data,
-             GError             **error)
+             GError             **error      UNUSED)
   {
     static_cast<MyContext*>(user_data)->text.assign (text, text_len);
   }

Modified: trunk/pan/tasks/queue.cc
==============================================================================
--- trunk/pan/tasks/queue.cc	(original)
+++ trunk/pan/tasks/queue.cc	Sat Jul  5 08:21:20 2008
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/data/server-info.h>
 #include "queue.h"
@@ -74,7 +74,7 @@
 }
 
 void
-Queue :: on_pool_error (const Quark& server, const StringView& message)
+Queue :: on_pool_error (const Quark& server UNUSED, const StringView& message)
 {
   fire_queue_error (message);
 }
@@ -342,21 +342,21 @@
 ***/
 
 void
-Queue :: on_set_items_added (TaskSet& container, TaskSet::items_t& tasks, int pos)
+Queue :: on_set_items_added (TaskSet& container UNUSED, TaskSet::items_t& tasks, int pos)
 {
   _needs_saving = true;
   fire_tasks_added (pos, tasks.size());
 }
 
 void
-Queue :: on_set_item_removed (TaskSet& container, Task*& task, int pos)
+Queue :: on_set_item_removed (TaskSet& container UNUSED, Task*& task, int pos)
 {
   _needs_saving = true;
   fire_task_removed (task, pos);
 }
 
 void
-Queue :: on_set_item_moved (TaskSet& container, Task*& task, int new_pos, int old_pos)
+Queue :: on_set_item_moved (TaskSet& container UNUSED, Task*& task, int new_pos, int old_pos)
 {
   _needs_saving = true;
   fire_task_moved (task, new_pos, old_pos);
@@ -629,7 +629,7 @@
 }
 
 void
-Queue :: check_in (Decoder* decoder, Task* task)
+Queue :: check_in (Decoder* decoder UNUSED, Task* task)
 {
   // take care of our decoder counting...
   _decoder_task = 0;

Modified: trunk/pan/tasks/queue.h
==============================================================================
--- trunk/pan/tasks/queue.h	(original)
+++ trunk/pan/tasks/queue.h	Sat Jul  5 08:21:20 2008
@@ -23,6 +23,7 @@
 #include <map>
 #include <set>
 #include <vector>
+#include <pan/general/macros.h> // for UNUSED
 #include <pan/general/map-vector.h>
 #include <pan/general/quark.h>
 #include <pan/tasks/decoder.h>
@@ -46,8 +47,8 @@
    */
   struct TaskArchive {
     virtual ~TaskArchive () { }
-    virtual void save_tasks (const std::vector<Task*>& saveme) { }
-    virtual void load_tasks (std::vector<Task*>& setme) { }
+    virtual void save_tasks (const std::vector<Task*>& saveme UNUSED) { }
+    virtual void load_tasks (std::vector<Task*>& setme UNUSED) { }
   };
 
   /**

Modified: trunk/pan/tasks/socket-impl-gio.cc
==============================================================================
--- trunk/pan/tasks/socket-impl-gio.cc	(original)
+++ trunk/pan/tasks/socket-impl-gio.cc	Sat Jul  5 08:21:20 2008
@@ -35,8 +35,8 @@
 }
 
 #include <pan/general/file-util.h>
-#include <pan/general/gassert.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/general/worker-pool.h>
 
 #ifdef G_OS_WIN32
@@ -575,7 +575,7 @@
     }
 
     /** called in main thread after do_work() is done */
-    void on_worker_done (bool cancelled)
+    void on_worker_done (bool cancelled UNUSED)
     {
       // pass results to main thread...
       if (!err.empty())   Log :: add_err (err.c_str());

Modified: trunk/pan/tasks/socket-impl-scripted.cc
==============================================================================
--- trunk/pan/tasks/socket-impl-scripted.cc	(original)
+++ trunk/pan/tasks/socket-impl-scripted.cc	Sat Jul  5 08:21:20 2008
@@ -39,7 +39,7 @@
 }
 
 bool
-ScriptedSocket :: open (const StringView& address, int port)
+ScriptedSocket :: open (const StringView& address UNUSED, int port UNUSED)
 {
   // FIXME: always succeeds right now; should have an ar in ctor to make it fail
   return true;

Modified: trunk/pan/tasks/task-article.cc
==============================================================================
--- trunk/pan/tasks/task-article.cc	(original)
+++ trunk/pan/tasks/task-article.cc	Sat Jul  5 08:21:20 2008
@@ -29,8 +29,8 @@
 }
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
-#include <pan/general/foreach.h>
 #include <pan/general/log.h>
+#include <pan/general/macros.h>
 #include <pan/usenet-utils/mime-utils.h>
 #include <pan/data/article-cache.h>
 #include "decoder.h"
@@ -249,7 +249,7 @@
 void
 TaskArticle :: on_nntp_done  (NNTP             * nntp,
                               Health             health,
-                              const StringView & response)
+                              const StringView & response UNUSED)
 {
   // find the Needed using this nntp...
   needed_t::iterator it;

Modified: trunk/pan/tasks/task-groups.cc
==============================================================================
--- trunk/pan/tasks/task-groups.cc	(original)
+++ trunk/pan/tasks/task-groups.cc	Sat Jul  5 08:21:20 2008
@@ -23,7 +23,7 @@
   #include <glib/gi18n.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/general/utf8-utils.h>
 #include <pan/data/data.h>
@@ -76,7 +76,7 @@
 }
 
 void
-TaskGroups :: on_nntp_line (NNTP               * nntp,
+TaskGroups :: on_nntp_line (NNTP               * nntp UNUSED,
                             const StringView   & line)
 {
   char permission ('y');
@@ -130,7 +130,7 @@
 void
 TaskGroups :: on_nntp_done (NNTP              * nntp,
                             Health              health,
-                            const StringView  & response)
+                            const StringView  & response UNUSED)
 {
   debug ("groups task got an on_nntp_done() from " << nntp->_server);
 

Modified: trunk/pan/tasks/task-xover.cc
==============================================================================
--- trunk/pan/tasks/task-xover.cc	(original)
+++ trunk/pan/tasks/task-xover.cc	Sat Jul  5 08:21:20 2008
@@ -25,7 +25,7 @@
   #include <gmime/gmime-utils.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/general/utf8-utils.h>
 #include <pan/data/data.h>
@@ -330,7 +330,7 @@
 void
 TaskXOver :: on_nntp_done (NNTP              * nntp,
                            Health              health,
-                           const StringView  & response)
+                           const StringView  & response UNUSED)
 {
   //std::cerr << LINE_ID << " nntp " << nntp->_server << " (" << nntp << ") done; checking in.  health==" << health << std::endl;
   update_work (true);

Modified: trunk/pan/tasks/task.cc
==============================================================================
--- trunk/pan/tasks/task.cc	(original)
+++ trunk/pan/tasks/task.cc	Sat Jul  5 08:21:20 2008
@@ -71,7 +71,7 @@
   use_decoder (d);
 }
 void
-Task :: use_decoder (Decoder * d)
+Task :: use_decoder (Decoder * d UNUSED)
 {
   abort ();
 }

Modified: trunk/pan/usenet-utils/filter-info.cc
==============================================================================
--- trunk/pan/usenet-utils/filter-info.cc	(original)
+++ trunk/pan/usenet-utils/filter-info.cc	Sat Jul  5 08:21:20 2008
@@ -22,7 +22,7 @@
   #include <glib.h>
   #include <glib/gi18n.h>
 }
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include "filter-info.h"
 
 using namespace pan;

Modified: trunk/pan/usenet-utils/gnksa.cc
==============================================================================
--- trunk/pan/usenet-utils/gnksa.cc	(original)
+++ trunk/pan/usenet-utils/gnksa.cc	Sat Jul  5 08:21:20 2008
@@ -40,7 +40,7 @@
 }
 
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/log.h>
 #include <pan/general/string-view.h>
 #include "gnksa.h"

Modified: trunk/pan/usenet-utils/message-check.cc
==============================================================================
--- trunk/pan/usenet-utils/message-check.cc	(original)
+++ trunk/pan/usenet-utils/message-check.cc	Sat Jul  5 08:21:20 2008
@@ -25,7 +25,7 @@
 #include <glib/gi18n.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/string-view.h>
 #include "gnksa.h"
 #include "message-check.h"

Modified: trunk/pan/usenet-utils/mime-utils.cc
==============================================================================
--- trunk/pan/usenet-utils/mime-utils.cc	(original)
+++ trunk/pan/usenet-utils/mime-utils.cc	Sat Jul  5 08:21:20 2008
@@ -28,7 +28,7 @@
   #include <gmime/gmime.h>
 }
 #include <pan/general/debug.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include <pan/general/messages.h>
 #include <pan/general/string-view.h>
 #include "mime-utils.h"

Modified: trunk/pan/usenet-utils/scorefile-test.cc
==============================================================================
--- trunk/pan/usenet-utils/scorefile-test.cc	(original)
+++ trunk/pan/usenet-utils/scorefile-test.cc	Sat Jul  5 08:21:20 2008
@@ -24,7 +24,7 @@
 };
 
 int
-main (int argc, char *argv[])
+main( )
 {
   MyFilenameToReader * my_ftr = new MyFilenameToReader ();
 

Modified: trunk/pan/usenet-utils/scorefile.cc
==============================================================================
--- trunk/pan/usenet-utils/scorefile.cc	(original)
+++ trunk/pan/usenet-utils/scorefile.cc	Sat Jul  5 08:21:20 2008
@@ -26,7 +26,7 @@
 }
 #include <pan/general/debug.h>
 #include <pan/general/log.h>
-#include <pan/general/foreach.h>
+#include <pan/general/macros.h>
 #include "filter-info.h"
 #include "scorefile.h"
 

Modified: trunk/pan/usenet-utils/text-massager.cc
==============================================================================
--- trunk/pan/usenet-utils/text-massager.cc	(original)
+++ trunk/pan/usenet-utils/text-massager.cc	Sat Jul  5 08:21:20 2008
@@ -70,7 +70,7 @@
 
    typedef std::set<char>::const_iterator c_cit;
    for (c_cit it=chars.begin(), end=chars.end(); it!=end; ++it)
-      _quote_characters[*it] = true;
+      _quote_characters[(int)*it] = true;
 }
 
 /****
@@ -345,8 +345,8 @@
    if (!inited)
    {
       inited = true;
-      char * plain ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
-      char * roted ("nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM");
+      const char * plain ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
+      const char * roted ("nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM");
       for (size_t i=0; i<UCHAR_MAX; ++i)
          translate[i] = (char)i;
       for (size_t i=0, len=strlen(plain); i!=len; ++i)



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