From: Arnaud Giersch Date: Sun, 10 Mar 2019 14:34:36 +0000 (+0100) Subject: Bad cast. X-Git-Tag: v3_22~129 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7177327de6a1fed71b87aad08702213c7db81ac1 Bad cast. --- diff --git a/src/bindings/java/jxbt_utilities.cpp b/src/bindings/java/jxbt_utilities.cpp index d6e18c9776..896c622609 100644 --- a/src/bindings/java/jxbt_utilities.cpp +++ b/src/bindings/java/jxbt_utilities.cpp @@ -6,6 +6,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "jxbt_utilities.hpp" +#include "xbt/string.hpp" #include "xbt/sysdep.h" #include /* abort */ @@ -162,7 +163,7 @@ void jxbt_throw_jni(JNIEnv* env, const std::string& msg) void jxbt_throw_notbound(JNIEnv* env, const std::string& kind, void* pointer) { jxbt_throw_by_name(env, "org/simgrid/msg/JniException", - "Internal error: " + kind + " " + static_cast(pointer) + " not bound"); + simgrid::xbt::string_printf("Internal error: %s %p not bound", kind.c_str(), pointer)); } void jxbt_throw_null(JNIEnv* env, const std::string& msg)