summaryrefslogtreecommitdiff
path: root/nci
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2022-01-21 14:12:47 -0800
committerPirama Arumuga Nainar <pirama@google.com>2022-01-21 14:17:36 -0800
commit040593a36e3fec2f0a0304379fc7e373d7e9dc80 (patch)
treedf82740d7ec7885375cc3a40c2fe25a358646ef9 /nci
parenta00dbb0b9ce02ef09f37d3caed0ad05d36b63542 (diff)
downloadNfc-040593a36e3fec2f0a0304379fc7e373d7e9dc80.tar.gz
Fix Wbitwise-instead-of-logical introduced by clang-r445002
Bug: http://b/215753485 packages/apps/Nfc/nci/jni/NativeNfcTag.cpp:1466:22: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] isFormattable = (NfcTag::getInstance().isMifareUltralight() | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ packages/apps/Nfc/nci/jni/NativeNfcTag.cpp:1466:22: note: cast one or both operands to int to silence this warning Test: Build with new clang Change-Id: Iaafa695751ef8626486836bf5d78899459dd152f
Diffstat (limited to 'nci')
-rw-r--r--nci/jni/NativeNfcTag.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/nci/jni/NativeNfcTag.cpp b/nci/jni/NativeNfcTag.cpp
index fdea143b..5d20d36e 100644
--- a/nci/jni/NativeNfcTag.cpp
+++ b/nci/jni/NativeNfcTag.cpp
@@ -1463,8 +1463,8 @@ static jboolean nativeNfcTag_doIsNdefFormatable(JNIEnv* e, jobject o,
} else if (NFA_PROTOCOL_T3T == protocol) {
isFormattable = NfcTag::getInstance().isFelicaLite() ? JNI_TRUE : JNI_FALSE;
} else if (NFA_PROTOCOL_T2T == protocol) {
- isFormattable = (NfcTag::getInstance().isMifareUltralight() |
- NfcTag::getInstance().isInfineonMyDMove() |
+ isFormattable = (NfcTag::getInstance().isMifareUltralight() ||
+ NfcTag::getInstance().isInfineonMyDMove() ||
NfcTag::getInstance().isKovioType2Tag())
? JNI_TRUE
: JNI_FALSE;