Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Pleases somewhat codefactor.io, lgtm, and pvs-studio.
[simgrid.git] / src / bindings / java / JavaContext.cpp
index 39a30704b3bf8b9da3efb5d57b295d804169c667..e1a1e4e92343a30fc70ecd72954dc69f8f109d0c 100644 (file)
@@ -56,8 +56,8 @@ void JavaContext::start_hook()
 
   //Attach the thread to the JVM
   JNIEnv *env;
-  XBT_ATTRIB_UNUSED jint error = __java_vm->AttachCurrentThread((void**)&env, nullptr);
-  xbt_assert((error == JNI_OK), "The thread could not be attached to the JVM");
+  xbt_assert(__java_vm->AttachCurrentThread((void**)&env, nullptr) == JNI_OK,
+             "The thread could not be attached to the JVM");
   this->jenv_ = env;
 }