[gjs] drop JS_LOCALETOUNICODE_NEEDS_CONST_CHAR check and silence warnings
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] drop JS_LOCALETOUNICODE_NEEDS_CONST_CHAR check and silence warnings
- Date: Wed, 4 Jan 2012 19:59:01 +0000 (UTC)
commit 4cecec9c4f8365eef0e5d9271b9ba0ce3e3ba012
Author: Marc-Antoine Perennou <Marc-Antoine Perennou com>
Date: Fri Dec 16 00:24:16 2011 +0100
drop JS_LOCALETOUNICODE_NEEDS_CONST_CHAR check and silence warnings
Since we now require mozjs185, it always needs a const char*
Silence btw warnings about argv sometimes not being used
https://bugzilla.gnome.org/show_bug.cgi?id=666331
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine Perennou com>
configure.ac | 20 --------------------
gi/keep-alive.c | 2 --
gi/ns.c | 2 --
gi/repo.c | 2 --
gi/union.c | 2 --
gjs/compat.h | 2 +-
gjs/context.c | 4 ----
gjs/importer.c | 1 -
modules/dbus-exports.c | 2 --
9 files changed, 1 insertions(+), 36 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 689f54d..96c4d76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,26 +95,6 @@ AC_CHECK_FUNCS(mallinfo)
echo "Using JS_CFLAGS: $JS_CFLAGS"
echo "Using JS_LIBS: $JS_LIBS"
-AC_MSG_CHECKING([whether JSLocaleToUnicode takes a const char*])
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $JS_CFLAGS -Wno-unused -Werror"
-AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <jsapi.h>
- extern JSBool test_fun (JSContext*, const char*, jsval*);
- ]],
- [[JSLocaleToUnicode jsltu = test_fun;]]
- )],
- [have_jslocale_to_unicode_const=yes],
- [have_jslocale_to_unicode_const=no])
-AC_MSG_RESULT([$have_jslocale_to_unicode_const])
-CFLAGS="$save_CFLAGS"
-
-if test "$have_jslocale_to_unicode_const" = yes; then
- AC_DEFINE([JS_LOCALETOUNICODE_NEEDS_CONST_CHAR], [1], [Define if JSLocaleToUnicode takes a const char* for its src])
-fi
-
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $JS_CFLAGS"
AC_MSG_CHECKING([for JS_CLASS_TRACE macro])
diff --git a/gi/keep-alive.c b/gi/keep-alive.c
index 5f9d64f..d45740a 100644
--- a/gi/keep-alive.c
+++ b/gi/keep-alive.c
@@ -85,8 +85,6 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(keep_alive)
GJS_NATIVE_CONSTRUCTOR_VARIABLES(keep_alive)
KeepAlive *priv;
- (void) argv;
-
GJS_NATIVE_CONSTRUCTOR_PRELUDE(keep_alive);
priv = g_slice_new0(KeepAlive);
diff --git a/gi/ns.c b/gi/ns.c
index 2108cdd..cea0882 100644
--- a/gi/ns.c
+++ b/gi/ns.c
@@ -150,8 +150,6 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(ns)
GJS_NATIVE_CONSTRUCTOR_VARIABLES(ns)
Ns *priv;
- (void) argv;
-
GJS_NATIVE_CONSTRUCTOR_PRELUDE(ns);
priv = g_slice_new0(Ns);
diff --git a/gi/repo.c b/gi/repo.c
index be8a615..08a6d4a 100644
--- a/gi/repo.c
+++ b/gi/repo.c
@@ -197,8 +197,6 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(repo)
GJS_NATIVE_CONSTRUCTOR_PRELUDE(repo);
- (void) argv;
-
priv = g_slice_new0(Repo);
GJS_INC_COUNTER(repo);
diff --git a/gi/union.c b/gi/union.c
index 09a26b6..ac921b2 100644
--- a/gi/union.c
+++ b/gi/union.c
@@ -199,8 +199,6 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(union)
priv = g_slice_new0(Union);
- (void) argv;
-
GJS_INC_COUNTER(boxed);
g_assert(priv_from_js(context, object) == NULL);
diff --git a/gjs/compat.h b/gjs/compat.h
index 260736d..8582e74 100644
--- a/gjs/compat.h
+++ b/gjs/compat.h
@@ -55,7 +55,7 @@ gjs_##name##_constructor(JSContext *context, \
*/
#define GJS_NATIVE_CONSTRUCTOR_VARIABLES(name) \
JSObject *object = NULL; \
- jsval *argv = JS_ARGV(context, vp);
+ jsval *argv G_GNUC_UNUSED = JS_ARGV(context, vp);
/**
* GJS_NATIVE_CONSTRUCTOR_PRELUDE:
diff --git a/gjs/context.c b/gjs/context.c
index 1139b22..c8039d2 100644
--- a/gjs/context.c
+++ b/gjs/context.c
@@ -512,11 +512,7 @@ out:
static JSBool
gjs_locale_to_unicode (JSContext *context,
-#ifdef JS_LOCALETOUNICODE_NEEDS_CONST_CHAR
const char *src,
-#else
- char *src,
-#endif
jsval *retval)
{
JSBool success;
diff --git a/gjs/importer.c b/gjs/importer.c
index 7d4cc3a..cfcee62 100644
--- a/gjs/importer.c
+++ b/gjs/importer.c
@@ -969,7 +969,6 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(importer)
Importer *priv;
GJS_NATIVE_CONSTRUCTOR_PRELUDE(importer);
- (void) argv;
priv = g_slice_new0(Importer);
diff --git a/modules/dbus-exports.c b/modules/dbus-exports.c
index 42b31fe..a9a1b0a 100644
--- a/modules/dbus-exports.c
+++ b/modules/dbus-exports.c
@@ -1713,8 +1713,6 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(js_exports)
GJS_NATIVE_CONSTRUCTOR_PRELUDE(js_exports);
- (void) argv;
-
priv = g_slice_new0(Exports);
GJS_INC_COUNTER(dbus_exports);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]