[seed] Clean up some warnings
- From: Robert Carr <racarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] Clean up some warnings
- Date: Fri, 17 Apr 2009 20:02:20 -0400 (EDT)
commit 8ccbaefbd86a0cac6d06b2b580bde06240e8983a
Author: Robert Carr <racarr svn gnome org>
Date: Fri Apr 17 19:59:52 2009 -0400
Clean up some warnings
---
libseed/Makefile.am | 2 +-
libseed/seed-engine.c | 26 --------------------------
libseed/seed-gtype.c | 3 +--
libseed/seed-importer.c | 10 +++++-----
libseed/seed-signals.c | 3 ---
5 files changed, 7 insertions(+), 37 deletions(-)
diff --git a/libseed/Makefile.am b/libseed/Makefile.am
index e61ec1e..7582402 100644
--- a/libseed/Makefile.am
+++ b/libseed/Makefile.am
@@ -25,7 +25,7 @@ libseed_la_SOURCES = \
seed-importer.h
libseed_la_LIBADD = $(LIBSEED_LIBS) $(LIBFFI_LIBS)
-libseed_la_CPPFLAGS = -lgmodule-2.0 $(LIBSEED_CFLAGS) $(SEED_OSX_CFLAGS) $(FFI_CFLAGS)
+libseed_la_CPPFLAGS = -lgmodule-2.0 $(LIBSEED_CFLAGS) $(SEED_OSX_CFLAGS) $(FFI_CFLAGS) -Wall
libseed_la_LDFLAGS = -no-undefined $(SEED_PROFILE_LDFLAGS) $(SEED_OSX_LDFLAGS) $(FFI_LIBS)
seedheaders_HEADERS = seed.h
diff --git a/libseed/seed-engine.c b/libseed/seed-engine.c
index 28c9c10..979fb10 100644
--- a/libseed/seed-engine.c
+++ b/libseed/seed-engine.c
@@ -860,31 +860,6 @@ seed_gobject_set_property (JSContextRef context,
return TRUE;
}
-static GModule *
-seed_try_load_extension (gchar * name)
-{
- GModule *module;
- gchar *path;
- gchar *lowername;
-
- lowername = g_utf8_strdown (name, -1);
-
- path = g_module_build_path ("/usr/local/lib/seed", lowername);
-
- module = g_module_open (path, G_MODULE_BIND_LAZY);
-
- if (!module)
- {
- g_free (path);
- path = g_module_build_path ("/usr/lib/seed", lowername);
-
- module = g_module_open (path, G_MODULE_BIND_LAZY);
- }
- g_free (path);
- g_free (lowername);
- return module;
-}
-
static JSValueRef
seed_gi_import_namespace (JSContextRef ctx,
JSObjectRef function,
@@ -897,7 +872,6 @@ seed_gi_import_namespace (JSContextRef ctx,
const gchar *version = 0;
gchar *jsextension;
JSStringRef extension_script;
- GModule *extension;
ctx = eng->context;
diff --git a/libseed/seed-gtype.c b/libseed/seed-gtype.c
index 1560818..79f2120 100644
--- a/libseed/seed-gtype.c
+++ b/libseed/seed-gtype.c
@@ -256,10 +256,9 @@ seed_gtype_get_property (GObject * object,
static GIBaseInfo *
seed_get_class_info_for_type (GType type)
{
- GType parent;
GIBaseInfo *object_info;
- while (type = g_type_parent (type))
+ while ((type = g_type_parent (type)))
{
object_info = g_irepository_find_by_gtype (NULL, type);
if (object_info)
diff --git a/libseed/seed-importer.c b/libseed/seed-importer.c
index 61571d8..e1d995c 100644
--- a/libseed/seed-importer.c
+++ b/libseed/seed-importer.c
@@ -335,7 +335,7 @@ seed_gi_importer_do_namespace (JSContextRef ctx,
gchar *jsextension;
JSStringRef extension_script;
- if (namespace_ref = g_hash_table_lookup (gi_imports, namespace))
+ if ((namespace_ref = g_hash_table_lookup (gi_imports, namespace)))
{
SEED_NOTE (IMPORTER, "Using existing namespace ref (%p) for %s",
namespace_ref, namespace);
@@ -504,7 +504,7 @@ seed_importer_handle_native_module (JSContextRef ctx,
SEED_NOTE (IMPORTER, "Trying native module: %s", file_path);
- if (module_obj = g_hash_table_lookup (file_imports, file_path))
+ if ((module_obj = g_hash_table_lookup (file_imports, file_path)))
{
g_free (file_path);
return module_obj;
@@ -563,7 +563,7 @@ seed_importer_handle_file (JSContextRef ctx,
canonical = seed_importer_canonicalize_path (file_path);
SEED_NOTE (IMPORTER, "Trying to import file: %s", file_path);
- if (global = g_hash_table_lookup (file_imports, canonical))
+ if ((global = g_hash_table_lookup (file_imports, canonical)))
{
SEED_NOTE (IMPORTER, "Using existing global");
@@ -646,7 +646,7 @@ seed_importer_search (JSContextRef ctx,
walk = walk->next;
continue;
}
- while (entry = g_dir_read_name(dir))
+ while ((entry = g_dir_read_name(dir)))
{
guint i;
gchar *mentry = g_strdup (entry);
@@ -748,7 +748,7 @@ seed_importer_dir_get_property (JSContextRef ctx,
return NULL;
}
- while (entry = g_dir_read_name (dir))
+ while ((entry = g_dir_read_name (dir)))
{
gchar *mentry = g_strdup (entry);
guint i;
diff --git a/libseed/seed-signals.c b/libseed/seed-signals.c
index 05c8ac1..e943ed6 100644
--- a/libseed/seed-signals.c
+++ b/libseed/seed-signals.c
@@ -162,8 +162,6 @@ seed_add_signals_to_object (JSContextRef ctx,
JSObjectRef object_ref, GObject * obj)
{
GType type;
- GType *interfaces;
- guint n, i;
JSObjectRef signals_ref, connect_func;
g_assert (obj);
@@ -391,7 +389,6 @@ seed_signal_holder_get_property (JSContextRef ctx,
JSValueRef *exception)
{
GObject *gobj = JSObjectGetPrivate (object);
- GType type = G_OBJECT_TYPE (gobj);
signal_privates *priv = g_slice_alloc (sizeof (signal_privates));
guint length = JSStringGetMaximumUTF8CStringSize (property_name);
gchar *signal_name = g_malloc (length * sizeof (gchar));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]