Remove clang compiler warnings for Android: -Wno-unused-parameter
Summary: att Reviewed By: gkmhub Differential Revision: D8972835 fbshipit-source-id: c8b893eefec6ccb5d8506c959bcf5c3f43701e81
This commit is contained in:
committed by
Facebook Github Bot
parent
9fe20fd2fc
commit
db5bc092aa
@@ -1,10 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -509,6 +509,8 @@ class PinnedCriticalAlloc {
|
|||||||
T** elements,
|
T** elements,
|
||||||
size_t* size,
|
size_t* size,
|
||||||
jboolean* isCopy) {
|
jboolean* isCopy) {
|
||||||
|
(void)start;
|
||||||
|
(void)length;
|
||||||
const auto env = internal::getEnv();
|
const auto env = internal::getEnv();
|
||||||
*elements = static_cast<T*>(env->GetPrimitiveArrayCritical(array.get(), isCopy));
|
*elements = static_cast<T*>(env->GetPrimitiveArrayCritical(array.get(), isCopy));
|
||||||
FACEBOOK_JNI_THROW_EXCEPTION_IF(!elements);
|
FACEBOOK_JNI_THROW_EXCEPTION_IF(!elements);
|
||||||
@@ -520,6 +522,8 @@ class PinnedCriticalAlloc {
|
|||||||
jint start,
|
jint start,
|
||||||
jint size,
|
jint size,
|
||||||
jint mode) {
|
jint mode) {
|
||||||
|
(void)start;
|
||||||
|
(void)size;
|
||||||
const auto env = internal::getEnv();
|
const auto env = internal::getEnv();
|
||||||
env->ReleasePrimitiveArrayCritical(array.get(), elements, mode);
|
env->ReleasePrimitiveArrayCritical(array.get(), elements, mode);
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -188,7 +188,9 @@ public:
|
|||||||
// particular java class) to be hoisted to a common function. If
|
// particular java class) to be hoisted to a common function. If
|
||||||
// mapException returns, then the std::exception will be translated
|
// mapException returns, then the std::exception will be translated
|
||||||
// to Java.
|
// to Java.
|
||||||
static void mapException(const std::exception& ex) {}
|
static void mapException(const std::exception& ex) {
|
||||||
|
(void)ex;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename B>
|
template <typename T, typename B>
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
@@ -53,6 +53,7 @@ struct ArgsArraySetter<idx, Arg, Args...> {
|
|||||||
template <int idx>
|
template <int idx>
|
||||||
struct ArgsArraySetter<idx> {
|
struct ArgsArraySetter<idx> {
|
||||||
static void set(alias_ref<JArrayClass<jobject>::javaobject> array) {
|
static void set(alias_ref<JArrayClass<jobject>::javaobject> array) {
|
||||||
|
(void)array;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
@@ -182,10 +182,11 @@ inline base_owned_ref<T, Alloc>::base_owned_ref() noexcept
|
|||||||
: base_owned_ref(nullptr)
|
: base_owned_ref(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template<typename T, typename Alloc>
|
template <typename T, typename Alloc>
|
||||||
inline base_owned_ref<T, Alloc>::base_owned_ref(std::nullptr_t t) noexcept
|
inline base_owned_ref<T, Alloc>::base_owned_ref(std::nullptr_t array) noexcept
|
||||||
: base_owned_ref(static_cast<javaobject>(nullptr))
|
: base_owned_ref(static_cast<javaobject>(nullptr)) {
|
||||||
{}
|
(void)array;
|
||||||
|
}
|
||||||
|
|
||||||
template<typename T, typename Alloc>
|
template<typename T, typename Alloc>
|
||||||
inline base_owned_ref<T, Alloc>::base_owned_ref(const base_owned_ref& other)
|
inline base_owned_ref<T, Alloc>::base_owned_ref(const base_owned_ref& other)
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Exceptions.h"
|
#include "Exceptions.h"
|
||||||
@@ -106,8 +106,10 @@ inline NativeMethodWrapper* exceptionWrapJNIMethod(R (*)(alias_ref<C>, Args... a
|
|||||||
|
|
||||||
// registration wrappers for non-static methods, with autoconvertion of arguments.
|
// registration wrappers for non-static methods, with autoconvertion of arguments.
|
||||||
|
|
||||||
template<typename M, M method, typename C, typename... Args>
|
template <typename M, M method, typename C, typename... Args>
|
||||||
inline NativeMethodWrapper* exceptionWrapJNIMethod(void (C::*method0)(Args... args)) {
|
inline NativeMethodWrapper* exceptionWrapJNIMethod(
|
||||||
|
void (C::*method0)(Args... args)) {
|
||||||
|
(void)method0;
|
||||||
struct funcWrapper {
|
struct funcWrapper {
|
||||||
JNI_ENTRY_POINT static void call(JNIEnv* env, jobject obj,
|
JNI_ENTRY_POINT static void call(JNIEnv* env, jobject obj,
|
||||||
typename Convert<typename std::decay<Args>::type>::jniType... args) {
|
typename Convert<typename std::decay<Args>::type>::jniType... args) {
|
||||||
|
Reference in New Issue
Block a user