This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[patch] java/lang/natClass.cc mark UNUSED arguments
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Java Patches <java-patches at gcc dot gnu dot org>
- Date: Sat, 20 May 2006 22:39:39 +0200
- Subject: [patch] java/lang/natClass.cc mark UNUSED arguments
Hello,
I found these unused arguments while compiling on systems w/o TLS.
I tested also a linux-pcc which does HAVE_TLS == 1.
Works.
Ok for main ?
Andreas
2006-05-20 Andreas Tobler <a.tobler@schweiz.ch>
* java/lang/natClass.cc (_Jv_FindMethodInCache): Mark klass, name and
signature as MAYBE_UNUSED for HAVE_TLS == 0.
(_Jv_AddMethodToCache): Mark klass and method as MAYBE_UNUSED for
HAVE_TLS == 0.
Index: java/lang/natClass.cc
===================================================================
--- java/lang/natClass.cc (revision 113923)
+++ java/lang/natClass.cc (working copy)
@@ -1,6 +1,6 @@
// natClass.cc - Implementation of java.lang.Class native methods.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation
This file is part of libgcj.
@@ -905,9 +905,9 @@
#endif // HAVE_TLS
static void *
-_Jv_FindMethodInCache (jclass klass,
- _Jv_Utf8Const *name,
- _Jv_Utf8Const *signature)
+_Jv_FindMethodInCache (jclass klass MAYBE_UNUSED,
+ _Jv_Utf8Const *name MAYBE_UNUSED,
+ _Jv_Utf8Const *signature MAYBE_UNUSED)
{
#ifdef HAVE_TLS
_Jv_mcache *cache = method_cache;
@@ -927,7 +927,8 @@
}
static void
-_Jv_AddMethodToCache (jclass klass, _Jv_Method *method)
+_Jv_AddMethodToCache (jclass klass MAYBE_UNUSED,
+ _Jv_Method *method MAYBE_UNUSED)
{
#ifdef HAVE_TLS
if (method_cache == NULL)