chore: Fix some C++ compiler warnings (#2576)

* chore: Fix some C++ compiler warnings

* Update MutableJByteBuffer.h

* Update MutableJByteBuffer.h

* Remove noexcept

* Explicit
This commit is contained in:
Marc Rousavy 2024-02-16 18:01:52 +01:00 committed by GitHub
parent 2c976d8ccd
commit f6b7163660
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ MutableJByteBuffer::MutableJByteBuffer(jni::alias_ref<jni::JByteBuffer> byteBuff
_byteBuffer = jni::make_global(byteBuffer); _byteBuffer = jni::make_global(byteBuffer);
} }
MutableJByteBuffer::~MutableJByteBuffer() noexcept { MutableJByteBuffer::~MutableJByteBuffer() {
// Hermes GC might destroy HostObjects on an arbitrary Thread which might not be // Hermes GC might destroy HostObjects on an arbitrary Thread which might not be
// connected to the JNI environment. To make sure fbjni can properly destroy // connected to the JNI environment. To make sure fbjni can properly destroy
// the Java method, we connect to a JNI environment first. // the Java method, we connect to a JNI environment first.

View File

@ -34,7 +34,7 @@ JSharedArray::JSharedArray(const jni::alias_ref<jhybridobject>& javaThis, const
#else #else
jsi::Runtime& runtime = *proxy->cthis()->getJSRuntime(); jsi::Runtime& runtime = *proxy->cthis()->getJSRuntime();
#endif #endif
__android_log_print(ANDROID_LOG_INFO, TAG, "Wrapping Java ByteBuffer with size %i...", byteBuffer->getDirectSize()); __android_log_print(ANDROID_LOG_INFO, TAG, "Wrapping Java ByteBuffer with size %zu...", byteBuffer->getDirectSize());
_byteBuffer = jni::make_global(byteBuffer); _byteBuffer = jni::make_global(byteBuffer);
_size = _byteBuffer->getDirectSize(); _size = _byteBuffer->getDirectSize();