From 74687dca581f1bbe441e0222e57b911f9ff1ec11 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 16 Feb 2016 11:05:10 -0500 Subject: [PATCH] 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 --- liblttng-ust-java-agent/jni/common/lttng_ust_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */ -- 2.34.1