Fix cert-dcl16-c clang-tidy warnings.
Bug: 120614316
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,cert-dcl16-c
Change-Id: I56a9b3e4c23a9542d1bf9ff05a4cd54bed169bd7
diff --git a/tests/aidl_test_client_parcelables.cpp b/tests/aidl_test_client_parcelables.cpp
index d8adf1f..7f52d73 100644
--- a/tests/aidl_test_client_parcelables.cpp
+++ b/tests/aidl_test_client_parcelables.cpp
@@ -93,14 +93,14 @@
PersistableBundle non_empty_bundle;
non_empty_bundle.putBoolean(String16("test_bool"), false);
non_empty_bundle.putInt(String16("test_int"), 33);
- non_empty_bundle.putLong(String16("test_long"), 34359738368l);
+ non_empty_bundle.putLong(String16("test_long"), 34359738368L);
non_empty_bundle.putDouble(String16("test_double"), 1.1);
non_empty_bundle.putString(String16("test_string"), String16("Woot!"));
non_empty_bundle.putBooleanVector(String16("test_bool_vector"),
{true, false, true});
non_empty_bundle.putIntVector(String16("test_int_vector"), {33, 44, 55, 142});
non_empty_bundle.putLongVector(String16("test_long_vector"),
- {34l, 8371l, 34359738375l});
+ {34L, 8371L, 34359738375L});
non_empty_bundle.putDoubleVector(String16("test_double_vector"), {2.2, 5.4});
non_empty_bundle.putStringVector(String16("test_string_vector"),
{String16("hello"), String16("world!")});
@@ -125,7 +125,7 @@
PersistableBundle second;
PersistableBundle third;
first.putInt(String16("test_int"), 1231);
- second.putLong(String16("test_long"), 222222l);
+ second.putLong(String16("test_long"), 222222L);
third.putDouble(String16("test_double"), 10.8);
const vector<PersistableBundle> original{first, second, third};
diff --git a/tests/aidl_test_client_primitives.cpp b/tests/aidl_test_client_primitives.cpp
index 528d3ba..98df528 100644
--- a/tests/aidl_test_client_primitives.cpp
+++ b/tests/aidl_test_client_primitives.cpp
@@ -64,7 +64,7 @@
!RepeatPrimitive(s, &ITestService::RepeatByte, int8_t{-128}) ||
!RepeatPrimitive(s, &ITestService::RepeatChar, char16_t{'A'}) ||
!RepeatPrimitive(s, &ITestService::RepeatInt, int32_t{1 << 30}) ||
- !RepeatPrimitive(s, &ITestService::RepeatLong, int64_t{1ll << 60}) ||
+ !RepeatPrimitive(s, &ITestService::RepeatLong, int64_t{1LL << 60}) ||
!RepeatPrimitive(s, &ITestService::RepeatFloat, float{1.0f/3.0f}) ||
!RepeatPrimitive(s, &ITestService::RepeatDouble, double{1.0/3.0}) ||
!RepeatPrimitive(s, &ITestService::RepeatMap, test_map) ||
@@ -132,7 +132,7 @@
!ReverseArray(s, &ITestService::ReverseInt,
{1, 2, 3}) ||
!ReverseArray(s, &ITestService::ReverseLong,
- {-1ll, 0ll, int64_t{1ll << 60}}) ||
+ {-1LL, 0LL, int64_t{1LL << 60}}) ||
!ReverseArray(s, &ITestService::ReverseFloat,
{-0.3f, -0.7f, 8.0f}) ||
!ReverseArray(s, &ITestService::ReverseDouble,