Commit 5c031a46 authored by Lubomir Bulej's avatar Lubomir Bulej
Browse files

Locally mark specific parameters as unused

parent 9044565e
......@@ -25,6 +25,12 @@
*/
#define PACKED __attribute__ ((__packed__))
#ifdef __GNUC__
#define UNUSED(p) UNUSED_ ## p __attribute__ ((__unused__))
#else
#define UNUSED(p) UNUSED_ ## p
#endif
#if defined(WHOLE) && __has_attribute(externally_visible)
#define VISIBLE __attribute__ ((externally_visible))
#else
......
......@@ -489,8 +489,8 @@ __get_classloader_tag (jvmtiEnv * jvmti, jobject loader) {
static void JNICALL
jvmti_callback_class_file_load (
jvmtiEnv * jvmti, JNIEnv * jni,
jclass class_being_redefined, jobject classloader,
const char * class_name, jobject protection_domain,
jclass UNUSED (class_being_redefined), jobject classloader,
const char * class_name, jobject UNUSED (protection_domain),
jint class_byte_count, const unsigned char * class_bytes,
jint * new_class_byte_count, unsigned char ** new_class_bytes
) {
......@@ -574,7 +574,7 @@ __release_thread_info:
// ****************************************************************************
static void JNICALL
jvmti_callback_vm_init (jvmtiEnv * jvmti, JNIEnv * jni, jthread thread) {
jvmti_callback_vm_init (jvmtiEnv * jvmti, JNIEnv * jni, jthread UNUSED (thread)) {
//
// Update flags to reflect that the VM has stopped booting.
//
......@@ -614,7 +614,7 @@ jvmti_callback_vm_init (jvmtiEnv * jvmti, JNIEnv * jni, jthread thread) {
// ****************************************************************************
static void JNICALL
jvmti_callback_vm_start (jvmtiEnv * jvmti, JNIEnv * jni) {
jvmti_callback_vm_start (jvmtiEnv * UNUSED (jvmti), JNIEnv * UNUSED (jni)) {
rdaprintf ("vm_start (the VM has been started)\n");
//
......@@ -822,7 +822,7 @@ __jvmti_enable_events (jvmtiEnv * jvmti, jvmtiEvent * events, size_t count) {
JNIEXPORT jint JNICALL VISIBLE
Agent_OnLoad (JavaVM * jvm, char * options, void * reserved) {
Agent_OnLoad (JavaVM * jvm, char * options, void * UNUSED (reserved)) {
jvmtiEnv * jvmti = __get_jvmti (jvm);
// Request JVMTI capabilities:
......@@ -882,7 +882,7 @@ Agent_OnLoad (JavaVM * jvm, char * options, void * reserved) {
// ****************************************************************************
JNIEXPORT void JNICALL VISIBLE
Agent_OnUnload (JavaVM * jvm) {
Agent_OnUnload (JavaVM * UNUSED (jvm)) {
rdaprintf ("agent unloaded, closing connections\n");
//
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment