From: Mathieu Desnoyers Date: Tue, 16 Feb 2016 16:05:10 +0000 (-0500) Subject: Fix: java agent 32-bit pointer to jlong warning X-Git-Tag: v2.8.0-rc1~29 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=74687dca581f1bbe441e0222e57b911f9ff1ec11;p=lttng-ust.git Fix: java agent 32-bit pointer to jlong warning Fix the following compiler warning on 32-bit: 15:07:12 lttng_ust_context.c: In function 'Java_org_lttng_ust_agent_context_LttngContextApi_registerProvider': 15:07:12 lttng_ust_context.c:377:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 15:07:12 provider_ref = (jlong) provider; Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c index f412cc18..3bed11ec 100644 --- a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c +++ b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c @@ -374,7 +374,7 @@ JNIEXPORT jlong JNICALL Java_org_lttng_ust_agent_context_LttngContextApi_registe goto error_register; } - provider_ref = (jlong) provider; + provider_ref = (jlong) (long) provider; return provider_ref; /* Error handling. */