[glibmm] fix warning in examples to make distcheck happy



commit 3bc53ee2a1566f6db327aed269b9e8b1f1f211c6
Author: Jonathon Jongsma <jonathon quotidian org>
Date:   Sat Jan 2 23:14:51 2010 -0600

    fix warning in examples to make distcheck happy
    
    warnings are errors in distcheck

 examples/network/resolver.cc      |    2 +-
 examples/network/socket-client.cc |    9 +++++----
 examples/network/socket-server.cc |    7 +++----
 3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/examples/network/resolver.cc b/examples/network/resolver.cc
index 4bf3844..a77be37 100644
--- a/examples/network/resolver.cc
+++ b/examples/network/resolver.cc
@@ -437,7 +437,7 @@ do_connectable (const std::string& arg, gboolean synchronous)
 static int cancel_fds[2];
 
 static void
-interrupted (int sig)
+interrupted (int /*sig*/)
 {
   signal (SIGINT, SIG_DFL);
   write (cancel_fds[1], "x", 1);
diff --git a/examples/network/socket-client.cc b/examples/network/socket-client.cc
index 456c18e..12a1e95 100644
--- a/examples/network/socket-client.cc
+++ b/examples/network/socket-client.cc
@@ -22,7 +22,7 @@ static GOptionEntry cmd_entries[] = {
    "Enable non-blocking i/o", NULL},
   {"use-source", 's', 0, G_OPTION_ARG_NONE, &use_source,
    "Use GSource to wait for non-blocking i/o", NULL},
-  {NULL}
+  {0, 0, 0, G_OPTION_ARG_NONE, 0, 0, 0}
 };
 
 Glib::ustring
@@ -44,8 +44,8 @@ socket_address_to_string (const Glib::RefPtr<Gio::SocketAddress>& address)
 }
 
 static bool
-source_ready (gpointer data,
-              GIOCondition condition)
+source_ready (gpointer /*data*/,
+              GIOCondition /*condition*/)
 {
   loop->quit ();
   return false;
@@ -140,7 +140,8 @@ main (int argc,
         socket_type = Gio::SOCKET_TYPE_STREAM;
 
     try {
-#warning "Gio::SocketFamily bug"
+        // FIXME: enum.pl has a problem generating the SocketFamily enum
+        // correctly, so I'm using the C enum directly for now as a workaround.
         socket = Gio::Socket::create ((Gio::SocketFamily)G_SOCKET_FAMILY_IPV4, socket_type, Gio::SOCKET_PROTOCOL_DEFAULT);
     } catch (const Gio::Error& error)
     {
diff --git a/examples/network/socket-server.cc b/examples/network/socket-server.cc
index 21ecd6b..d2dc315 100644
--- a/examples/network/socket-server.cc
+++ b/examples/network/socket-server.cc
@@ -27,7 +27,7 @@ static GOptionEntry cmd_entries[] = {
    "Enable non-blocking i/o", NULL},
   {"use-source", 's', 0, G_OPTION_ARG_NONE, &use_source,
    "Use GSource to wait for non-blocking i/o", NULL},
-  {NULL}
+  {0, 0, 0, G_OPTION_ARG_NONE, 0, 0, 0}
 };
 
 Glib::ustring
@@ -49,8 +49,8 @@ socket_address_to_string (const Glib::RefPtr<Gio::SocketAddress>& address)
 }
 
 static bool
-source_ready (gpointer data,
-              GIOCondition condition)
+source_ready (gpointer /*data*/,
+              GIOCondition /*condition*/)
 {
   loop->quit ();
   return false;
@@ -137,7 +137,6 @@ main (int argc,
         socket_type = Gio::SOCKET_TYPE_STREAM;
 
     try {
-#warning "Gio::SocketFamily bug"
         socket = Gio::Socket::create ((Gio::SocketFamily)G_SOCKET_FAMILY_IPV4, socket_type, Gio::SOCKET_PROTOCOL_DEFAULT);
     } catch (const Gio::Error& error)
     {



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