summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrion Hodson <oth@google.com>2019-10-16 09:11:12 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-10-16 09:11:12 -0700
commitd08a73b8841b51b29ca2245a612282acc0490d25 (patch)
tree60a421d346615fd0f1b3171fa5d3820d01ae0867
parente3619336f88d18a51699f3882df9a2f541f22842 (diff)
parent31b3ffa32d4efc3868806917ca3f2c82847478c7 (diff)
Remove temporary CPPLINT.cfg files
am: 31b3ffa32d Change-Id: Ibc29c6722ae553aa1d7291c123fc5dead6ba58a6
-rw-r--r--libnativebridge/CPPLINT.cfg19
-rw-r--r--libnativebridge/include/nativebridge/native_bridge.h6
-rw-r--r--libnativebridge/native_bridge.cc4
-rw-r--r--libnativebridge/tests/NativeBridgeTest.h6
-rw-r--r--libnativeloader/CPPLINT.cfg19
-rw-r--r--libnativeloader/include/nativeloader/dlext_namespaces.h6
-rw-r--r--libnativeloader/include/nativeloader/native_loader.h6
-rw-r--r--libnativeloader/library_namespaces.h7
-rw-r--r--libnativeloader/native_loader_namespace.h7
-rw-r--r--libnativeloader/public_libraries.h6
-rw-r--r--libnativeloader/utils.h6
11 files changed, 36 insertions, 56 deletions
diff --git a/libnativebridge/CPPLINT.cfg b/libnativebridge/CPPLINT.cfg
deleted file mode 100644
index 578047ba10..0000000000
--- a/libnativebridge/CPPLINT.cfg
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2019 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-filter=-build/header_guard
-filter=-whitespace/comments
-filter=-whitespace/parens
diff --git a/libnativebridge/include/nativebridge/native_bridge.h b/libnativebridge/include/nativebridge/native_bridge.h
index e9c9500252..22c128ba1f 100644
--- a/libnativebridge/include/nativebridge/native_bridge.h
+++ b/libnativebridge/include/nativebridge/native_bridge.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef NATIVE_BRIDGE_H_
-#define NATIVE_BRIDGE_H_
+#ifndef ART_LIBNATIVEBRIDGE_INCLUDE_NATIVEBRIDGE_NATIVE_BRIDGE_H_
+#define ART_LIBNATIVEBRIDGE_INCLUDE_NATIVEBRIDGE_NATIVE_BRIDGE_H_
#include <signal.h>
#include <stdbool.h>
@@ -415,4 +415,4 @@ struct NativeBridgeRuntimeCallbacks {
} // namespace android
#endif // __cplusplus
-#endif // NATIVE_BRIDGE_H_
+#endif // ART_LIBNATIVEBRIDGE_INCLUDE_NATIVEBRIDGE_NATIVE_BRIDGE_H_
diff --git a/libnativebridge/native_bridge.cc b/libnativebridge/native_bridge.cc
index 9adba9a50e..82dd5629a0 100644
--- a/libnativebridge/native_bridge.cc
+++ b/libnativebridge/native_bridge.cc
@@ -276,7 +276,7 @@ bool PreInitializeNativeBridge(const char* app_data_dir_in, const char* instruct
// Create the path to the application code cache directory.
// The memory will be release after Initialization or when the native bridge is closed.
- const size_t len = strlen(app_data_dir_in) + strlen(kCodeCacheDir) + 2; // '\0' + '/'
+ const size_t len = strlen(app_data_dir_in) + strlen(kCodeCacheDir) + 2; // '\0' + '/'
app_code_cache_dir = new char[len];
snprintf(app_code_cache_dir, len, "%s/%s", app_data_dir_in, kCodeCacheDir);
@@ -455,7 +455,7 @@ void UnloadNativeBridge() {
// We expect only one place that calls UnloadNativeBridge: Runtime::DidForkFromZygote. At that
// point we are not multi-threaded, so we do not need locking here.
- switch(state) {
+ switch (state) {
case NativeBridgeState::kOpened:
case NativeBridgeState::kPreInitialized:
case NativeBridgeState::kInitialized:
diff --git a/libnativebridge/tests/NativeBridgeTest.h b/libnativebridge/tests/NativeBridgeTest.h
index 0f99816c9f..cc7990742e 100644
--- a/libnativebridge/tests/NativeBridgeTest.h
+++ b/libnativebridge/tests/NativeBridgeTest.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef NATIVE_BRIDGE_TEST_H_
-#define NATIVE_BRIDGE_TEST_H_
+#ifndef ART_LIBNATIVEBRIDGE_TESTS_NATIVEBRIDGETEST_H_
+#define ART_LIBNATIVEBRIDGE_TESTS_NATIVEBRIDGETEST_H_
#define LOG_TAG "NativeBridge_test"
@@ -35,5 +35,5 @@ class NativeBridgeTest : public testing::Test {
}; // namespace android
-#endif // NATIVE_BRIDGE_H_
+#endif // ART_LIBNATIVEBRIDGE_TESTS_NATIVEBRIDGETEST_H_
diff --git a/libnativeloader/CPPLINT.cfg b/libnativeloader/CPPLINT.cfg
deleted file mode 100644
index db98533fc7..0000000000
--- a/libnativeloader/CPPLINT.cfg
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2019 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-filter=-build/header_guard
-filter=-readability/check
-filter=-build/namespaces
diff --git a/libnativeloader/include/nativeloader/dlext_namespaces.h b/libnativeloader/include/nativeloader/dlext_namespaces.h
index 8937636cf5..ed335eedd6 100644
--- a/libnativeloader/include/nativeloader/dlext_namespaces.h
+++ b/libnativeloader/include/nativeloader/dlext_namespaces.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef __ANDROID_DLEXT_NAMESPACES_H__
-#define __ANDROID_DLEXT_NAMESPACES_H__
+#ifndef ART_LIBNATIVELOADER_INCLUDE_NATIVELOADER_DLEXT_NAMESPACES_H_
+#define ART_LIBNATIVELOADER_INCLUDE_NATIVELOADER_DLEXT_NAMESPACES_H_
#include <android/dlext.h>
#include <stdbool.h>
@@ -111,4 +111,4 @@ extern struct android_namespace_t* android_get_exported_namespace(const char* na
__END_DECLS
-#endif /* __ANDROID_DLEXT_NAMESPACES_H__ */
+#endif // ART_LIBNATIVELOADER_INCLUDE_NATIVELOADER_DLEXT_NAMESPACES_H_
diff --git a/libnativeloader/include/nativeloader/native_loader.h b/libnativeloader/include/nativeloader/native_loader.h
index 51fb875f68..4fd8092c7c 100644
--- a/libnativeloader/include/nativeloader/native_loader.h
+++ b/libnativeloader/include/nativeloader/native_loader.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef NATIVE_LOADER_H_
-#define NATIVE_LOADER_H_
+#ifndef ART_LIBNATIVELOADER_INCLUDE_NATIVELOADER_NATIVE_LOADER_H_
+#define ART_LIBNATIVELOADER_INCLUDE_NATIVELOADER_NATIVE_LOADER_H_
#include <stdbool.h>
#include <stdint.h>
@@ -75,4 +75,4 @@ void ResetNativeLoader();
} // namespace android
#endif // __cplusplus
-#endif // NATIVE_BRIDGE_H_
+#endif // ART_LIBNATIVELOADER_INCLUDE_NATIVELOADER_NATIVE_LOADER_H_
diff --git a/libnativeloader/library_namespaces.h b/libnativeloader/library_namespaces.h
index 7b3efff4df..8fac534302 100644
--- a/libnativeloader/library_namespaces.h
+++ b/libnativeloader/library_namespaces.h
@@ -13,7 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#pragma once
+
+#ifndef ART_LIBNATIVELOADER_LIBRARY_NAMESPACES_H_
+#define ART_LIBNATIVELOADER_LIBRARY_NAMESPACES_H_
+
#if !defined(__ANDROID__)
#error "Not available for host"
#endif
@@ -65,3 +68,5 @@ class LibraryNamespaces {
};
} // namespace android::nativeloader
+
+#endif // ART_LIBNATIVELOADER_LIBRARY_NAMESPACES_H_
diff --git a/libnativeloader/native_loader_namespace.h b/libnativeloader/native_loader_namespace.h
index 7200ee7961..d07c431ebd 100644
--- a/libnativeloader/native_loader_namespace.h
+++ b/libnativeloader/native_loader_namespace.h
@@ -13,7 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#pragma once
+
+#ifndef ART_LIBNATIVELOADER_NATIVE_LOADER_NAMESPACE_H_
+#define ART_LIBNATIVELOADER_NATIVE_LOADER_NAMESPACE_H_
+
#if defined(__ANDROID__)
#include <string>
@@ -71,3 +74,5 @@ struct NativeLoaderNamespace {
} // namespace android
#endif // #if defined(__ANDROID__)
+
+#endif // ART_LIBNATIVELOADER_NATIVE_LOADER_NAMESPACE_H_
diff --git a/libnativeloader/public_libraries.h b/libnativeloader/public_libraries.h
index b892e6f69c..a342baa08c 100644
--- a/libnativeloader/public_libraries.h
+++ b/libnativeloader/public_libraries.h
@@ -13,7 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#pragma once
+
+#ifndef ART_LIBNATIVELOADER_PUBLIC_LIBRARIES_H_
+#define ART_LIBNATIVELOADER_PUBLIC_LIBRARIES_H_
#include <algorithm>
#include <string>
@@ -54,3 +56,5 @@ Result<std::vector<std::string>> ParseConfig(
} // namespace internal
} // namespace android::nativeloader
+
+#endif // ART_LIBNATIVELOADER_PUBLIC_LIBRARIES_H_
diff --git a/libnativeloader/utils.h b/libnativeloader/utils.h
index a1c2be5477..9066e575b1 100644
--- a/libnativeloader/utils.h
+++ b/libnativeloader/utils.h
@@ -13,7 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#pragma once
+
+#ifndef ART_LIBNATIVELOADER_UTILS_H_
+#define ART_LIBNATIVELOADER_UTILS_H_
namespace android::nativeloader {
@@ -24,3 +26,5 @@ namespace android::nativeloader {
#endif
} // namespace android::nativeloader
+
+#endif // ART_LIBNATIVELOADER_UTILS_H_