[gjs] Quiet a bunch of set-but-unused variable warnings
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] Quiet a bunch of set-but-unused variable warnings
- Date: Thu, 10 Mar 2011 21:30:11 +0000 (UTC)
commit 74e570745639194255d07c6ce53d930afb8c7de7
Author: Colin Walters <walters verbum org>
Date: Thu Mar 10 16:30:35 2011 -0500
Quiet a bunch of set-but-unused variable warnings
gi/function.c | 5 -----
gi/object.c | 4 ----
gjs-dbus/dbus-proxy.c | 3 ---
gjs-dbus/dbus.c | 1 +
gjs/importer.c | 3 +--
modules/dbus.c | 4 ----
6 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/gi/function.c b/gi/function.c
index a540836..379cd9d 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -548,11 +548,9 @@ gjs_invoke_c_function(JSContext *context,
out_args_pos++;
} else {
GArgument *in_value;
- GITypeTag type_tag;
GITypeInfo ainfo;
g_arg_info_load_type(&arg_info, &ainfo);
- type_tag = g_type_info_get_tag(&ainfo);
g_assert_cmpuint(in_args_pos, <, in_args_len);
in_value = &in_arg_cvalues[in_args_pos];
@@ -998,7 +996,6 @@ init_cached_function_data (JSContext *context,
GIFunctionInfo *info)
{
guint8 i, n_args;
- gboolean is_method;
GError *error = NULL;
GITypeInfo return_type;
@@ -1007,8 +1004,6 @@ init_cached_function_data (JSContext *context,
return FALSE;
}
- is_method = (g_function_info_get_flags(info) & GI_FUNCTION_IS_METHOD) != 0;
-
g_callable_info_load_return_type((GICallableInfo*)info, &return_type);
if (g_type_info_get_tag(&return_type) != GI_TYPE_TAG_VOID)
function->js_out_argc += 1;
diff --git a/gi/object.c b/gi/object.c
index 5355ba6..18afa79 100644
--- a/gi/object.c
+++ b/gi/object.c
@@ -1184,19 +1184,15 @@ gjs_define_static_methods(JSContext *context,
GIObjectInfo *object_info)
{
int i;
- const char *obj_name;
int n_methods;
- obj_name = g_base_info_get_name ((GIBaseInfo*)object_info);
n_methods = g_object_info_get_n_methods(object_info);
for (i = 0; i < n_methods; i++) {
GIFunctionInfo *meth_info;
GIFunctionInfoFlags flags;
- const char *name;
meth_info = g_object_info_get_method(object_info, i);
- name = g_base_info_get_name((GIBaseInfo*)meth_info);
flags = g_function_info_get_flags (meth_info);
/* Anything that isn't a method we put on the prototype of the
diff --git a/gjs-dbus/dbus-proxy.c b/gjs-dbus/dbus-proxy.c
index eaaea50..5cfca8e 100644
--- a/gjs-dbus/dbus-proxy.c
+++ b/gjs-dbus/dbus-proxy.c
@@ -169,14 +169,11 @@ gjs_dbus_proxy_constructor (GType type,
GObjectConstructParam *construct_params)
{
GObject *object;
- GjsDBusProxy *proxy;
object = (* G_OBJECT_CLASS (gjs_dbus_proxy_parent_class)->constructor) (type,
n_construct_properties,
construct_params);
- proxy = GJS_DBUS_PROXY(object);
-
return object;
}
diff --git a/gjs-dbus/dbus.c b/gjs-dbus/dbus.c
index 34e336f..4b526f3 100644
--- a/gjs-dbus/dbus.c
+++ b/gjs-dbus/dbus.c
@@ -1056,6 +1056,7 @@ name_watch_filter_message(DBusConnection *connection,
GjsDBusInfo *info;
info = _gjs_dbus_ensure_info(connection);
+ (void) info;
if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameOwnerChanged") &&
dbus_message_has_sender(message, DBUS_SERVICE_DBUS)) {
diff --git a/gjs/importer.c b/gjs/importer.c
index 9e29545..571d51f 100644
--- a/gjs/importer.c
+++ b/gjs/importer.c
@@ -1043,6 +1043,7 @@ importer_new(JSContext *context)
JSObject *importer;
Importer *priv;
JSObject *global;
+ (void) priv;
global = gjs_get_import_global(context);
@@ -1083,8 +1084,6 @@ importer_new(JSContext *context)
if (importer == NULL)
gjs_fatal("No memory to create ns object");
- priv = priv_from_js(context, importer);
-
return importer;
}
diff --git a/modules/dbus.c b/modules/dbus.c
index 2b22c20..2a3fec1 100644
--- a/modules/dbus.c
+++ b/modules/dbus.c
@@ -362,10 +362,6 @@ pending_notify(DBusPendingCall *pending,
static void
pending_free_closure(void *data)
{
- GClosure *closure;
-
- closure = data;
-
g_closure_invalidate(data);
g_closure_unref(data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]