diff --git a/common/src/jni/main/cpp/conscrypt/jniutil.cc b/common/src/jni/main/cpp/conscrypt/jniutil.cc index 7f106a9ce..96385df2a 100644 --- a/common/src/jni/main/cpp/conscrypt/jniutil.cc +++ b/common/src/jni/main/cpp/conscrypt/jniutil.cc @@ -159,14 +159,15 @@ void jniRegisterNativeMethods(JNIEnv* env, const char* className, const JNINativ ScopedLocalRef c(env, env->FindClass(className)); if (c.get() == nullptr) { char* msg; - (void)asprintf(&msg, "Native registration unable to find class '%s'; aborting...", - className); + CONSCRYPT_UNUSED int n = asprintf( + &msg, "Native registration unable to find class '%s'; aborting...", className); env->FatalError(msg); } if (env->RegisterNatives(c.get(), gMethods, numMethods) < 0) { char* msg; - (void)asprintf(&msg, "RegisterNatives failed for '%s'; aborting...", className); + CONSCRYPT_UNUSED int n = + asprintf(&msg, "RegisterNatives failed for '%s'; aborting...", className); env->FatalError(msg); } } diff --git a/common/src/jni/main/cpp/conscrypt/native_crypto.cc b/common/src/jni/main/cpp/conscrypt/native_crypto.cc index ab1f1512a..965b80150 100644 --- a/common/src/jni/main/cpp/conscrypt/native_crypto.cc +++ b/common/src/jni/main/cpp/conscrypt/native_crypto.cc @@ -7835,7 +7835,7 @@ static int sslSelect(JNIEnv* env, int type, jobject fdObject, AppData* appData, if (fds[1].revents & POLLIN) { char token; do { - (void)read(appData->fdsEmergency[0], &token, 1); + CONSCRYPT_UNUSED int n = read(appData->fdsEmergency[0], &token, 1); } while (errno == EINTR); } } @@ -7866,7 +7866,7 @@ static void sslNotify(AppData* appData) { char token = '*'; do { errno = 0; - (void)write(appData->fdsEmergency[1], &token, 1); + CONSCRYPT_UNUSED int n = write(appData->fdsEmergency[1], &token, 1); } while (errno == EINTR); errno = errnoBackup; #endif