[libpeas] Fix various gcc warnings



commit 4514a2c0e0df176ad62af96391ac2d8ee65b2eed
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Aug 5 09:19:10 2010 +0100

    Fix various gcc warnings

 loaders/python/peas-plugin-loader-python.c         |    9 +++++----
 peas-demo/peas-demo.c                              |    6 +++---
 .../helloworld/peasdemo-hello-world-plugin.c       |    1 -
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 9d53a65..10c35b1 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -102,6 +102,7 @@ find_python_extension_type (PeasPluginInfo *info,
         case 0:
           continue;
         case -1:
+        default:
           PyErr_Print ();
           continue;
         }
@@ -418,7 +419,7 @@ peas_plugin_loader_python_add_module_path (PeasPluginLoaderPython *self,
   if (!Py_IsInitialized ())
     return FALSE;
 
-  pathlist = PySys_GetObject ("path");
+  pathlist = PySys_GetObject ((char*) "path");
   pathstring = PyString_FromString (module_path);
 
   if (PySequence_Contains (pathlist, pathstring) == 0)
@@ -432,7 +433,7 @@ static gboolean
 peas_python_init (PeasPluginLoaderPython *loader)
 {
   PyObject *mdict, *gobject, *gi, *gettext, *install, *gettext_args;
-  char *argv[] = { "", NULL };
+  const char *argv[] = { "", NULL };
   gchar *prgname;
 
   /* We are trying to initialize Python for the first time,
@@ -452,10 +453,10 @@ peas_python_init (PeasPluginLoaderPython *loader)
     argv[0] = prgname;
 
 #if PY_VERSION_HEX < 0x02060600
-  PySys_SetArgv (1, argv);
+  PySys_SetArgv (1, (char**) argv);
   PyRun_SimpleString ("import sys; sys.path.pop(0)\n");
 #else
-  PySys_SetArgvEx (1, argv, 0);
+  PySys_SetArgvEx (1, (char**) argv, 0);
 #endif
 
   /* Note that we don't call this with the GIL held, since we haven't initialised pygobject yet */
diff --git a/peas-demo/peas-demo.c b/peas-demo/peas-demo.c
index 877b0f3..a30e346 100644
--- a/peas-demo/peas-demo.c
+++ b/peas-demo/peas-demo.c
@@ -97,15 +97,15 @@ create_main_window (void)
   gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0);
 
   button = gtk_button_new_with_label ("Hello World");
-  g_signal_connect (button, "clicked", G_CALLBACK (activate_plugin), "helloworld");
+  g_signal_connect (button, "clicked", G_CALLBACK (activate_plugin), (gpointer) "helloworld");
   gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0);
 
   button = gtk_button_new_with_label ("Python Hello");
-  g_signal_connect (button, "clicked", G_CALLBACK (activate_plugin), "pythonhello");
+  g_signal_connect (button, "clicked", G_CALLBACK (activate_plugin), (gpointer) "pythonhello");
   gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0);
 
   button = gtk_button_new_with_label ("Seed Hello");
-  g_signal_connect (button, "clicked", G_CALLBACK (activate_plugin), "seedhello");
+  g_signal_connect (button, "clicked", G_CALLBACK (activate_plugin), (gpointer) "seedhello");
   gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0);
 
   button = gtk_button_new_from_stock (GTK_STOCK_PREFERENCES);
diff --git a/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c b/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
index 7500a25..86ae15e 100644
--- a/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
+++ b/peas-demo/plugins/helloworld/peasdemo-hello-world-plugin.c
@@ -93,7 +93,6 @@ static void
 peasdemo_hello_world_plugin_activate (PeasActivatable *activatable)
 {
   PeasDemoHelloWorldPlugin *plugin = PEASDEMO_HELLO_WORLD_PLUGIN (activatable);
-  GtkWidget *label;
 
   g_debug (G_STRFUNC);
 



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