summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2011-12-16 00:24:16 +0100
committerJasper St. Pierre <jstpierre@mecheye.net>2012-01-04 14:58:08 -0500
commit4cecec9c4f8365eef0e5d9271b9ba0ce3e3ba012 (patch)
treeff371f311c6b810a1f101e0a786998c90c8145df
parentea4d639eab307737870479b6573d5dab9fb2915a (diff)
downloadgjs-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.ac20
-rw-r--r--gi/keep-alive.c2
-rw-r--r--gi/ns.c2
-rw-r--r--gi/repo.c2
-rw-r--r--gi/union.c2
-rw-r--r--gjs/compat.h2
-rw-r--r--gjs/context.c4
-rw-r--r--gjs/importer.c1
-rw-r--r--modules/dbus-exports.c2
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);
diff --git a/gi/ns.c b/gi/ns.c
index 2108cdd7..cea08825 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 be8a6158..08a6d4ae 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 09a26b65..ac921b21 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 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);