diff options
author | Marc-Antoine Perennou <Marc-Antoine@Perennou.com> | 2011-12-16 00:24:16 +0100 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-01-04 14:58:08 -0500 |
commit | 4cecec9c4f8365eef0e5d9271b9ba0ce3e3ba012 (patch) | |
tree | ff371f311c6b810a1f101e0a786998c90c8145df | |
parent | ea4d639eab307737870479b6573d5dab9fb2915a (diff) | |
download | gjs-4cecec9c4f8365eef0e5d9271b9ba0ce3e3ba012.tar.gz |
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>
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | gi/keep-alive.c | 2 | ||||
-rw-r--r-- | gi/ns.c | 2 | ||||
-rw-r--r-- | gi/repo.c | 2 | ||||
-rw-r--r-- | gi/union.c | 2 | ||||
-rw-r--r-- | gjs/compat.h | 2 | ||||
-rw-r--r-- | gjs/context.c | 4 | ||||
-rw-r--r-- | gjs/importer.c | 1 | ||||
-rw-r--r-- | modules/dbus-exports.c | 2 |
9 files changed, 1 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac index 689f54df..96c4d762 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 5f9d64f0..d45740a3 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); @@ -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); @@ -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); @@ -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 260736d7..8582e745 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 1139b22f..c8039d27 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 7d4cc3a3..cfcee621 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 42b31fef..a9a1b0aa 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); |