aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-02-01 20:05:03 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-02-01 20:05:03 +0000
commit3953c0578989ec9a8df4246186a9d5cf75914813 (patch)
tree8d9a40b71171dcb730488ad9eff4126661a42704 /libjava
parentafd4cbbb504bc4294060776538a77f1d3882cd52 (diff)
downloadgcc-3953c0578989ec9a8df4246186a9d5cf75914813.zip
gcc-3953c0578989ec9a8df4246186a9d5cf75914813.tar.gz
gcc-3953c0578989ec9a8df4246186a9d5cf75914813.tar.bz2
jvm.h (MAYBE_UNUSED): New macro tp mark probably unused arguments.
2004-02-01 Michael Koch <konqueror@gmx.de> * include/jvm.h (MAYBE_UNUSED): New macro tp mark probably unused arguments. * jni.cc (_Jv_LookupJNIMethod): Mark 'args_size' unused. * verify.cc (debug_print): Mark 'fmt' unused. From-SVN: r77079
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog7
-rw-r--r--libjava/include/jvm.h3
-rw-r--r--libjava/jni.cc2
-rw-r--r--libjava/verify.cc2
4 files changed, 12 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index b104689..9318a07 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,10 @@
+2004-02-01 Michael Koch <konqueror@gmx.de>
+
+ * include/jvm.h (MAYBE_UNUSED): New macro tp mark probably unused
+ arguments.
+ * jni.cc (_Jv_LookupJNIMethod): Mark 'args_size' unused.
+ * verify.cc (debug_print): Mark 'fmt' unused.
+
2004-01-30 Michael Koch <konqueror@gmx.de>
* configure.in: Use pkg-config to check for GTK 2.2 and libart 2.1.
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h
index e1a5c33..ee7792b 100644
--- a/libjava/include/jvm.h
+++ b/libjava/include/jvm.h
@@ -30,6 +30,9 @@ details. */
#include <gcj/cni.h>
#include <gcj/field.h>
+/* Macro for possible unused arguments. */
+#define MAYBE_UNUSED __attribute__((__unused__))
+
/* Structure of the virtual table. */
struct _Jv_VTable
{
diff --git a/libjava/jni.cc b/libjava/jni.cc
index 007aabc..3e8b11b 100644
--- a/libjava/jni.cc
+++ b/libjava/jni.cc
@@ -2051,7 +2051,7 @@ _Jv_GetJNIEnvNewFrame (jclass klass)
// This is `extern "C"' because the compiler uses it.
extern "C" void *
_Jv_LookupJNIMethod (jclass klass, _Jv_Utf8Const *name,
- _Jv_Utf8Const *signature, int args_size)
+ _Jv_Utf8Const *signature, MAYBE_UNUSED int args_size)
{
char buf[10 + 6 * (name->length + signature->length) + 12];
int long_start;
diff --git a/libjava/verify.cc b/libjava/verify.cc
index 8c037ed..236bc4d 100644
--- a/libjava/verify.cc
+++ b/libjava/verify.cc
@@ -40,7 +40,7 @@ static void debug_print (const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
static inline void
-debug_print (const char *fmt, ...)
+debug_print (MAYBE_UNUSED const char *fmt, ...)
{
#ifdef VERIFY_DEBUG
va_list ap;