diff options
Diffstat (limited to 'libartbase/base/utils.cc')
| -rw-r--r-- | libartbase/base/utils.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libartbase/base/utils.cc b/libartbase/base/utils.cc index 661dfc4d22..e114e4dbac 100644 --- a/libartbase/base/utils.cc +++ b/libartbase/base/utils.cc @@ -37,6 +37,7 @@ #if defined(__APPLE__) #include <crt_externs.h> +// NOLINTNEXTLINE - inclusion of syscall is dependent on arch #include <sys/syscall.h> #include "AvailabilityMacros.h" // For MAC_OS_X_VERSION_MAX_ALLOWED #endif @@ -44,11 +45,13 @@ #if defined(__BIONIC__) // membarrier(2) is only supported for target builds (b/111199492). #include <linux/membarrier.h> +// NOLINTNEXTLINE - inclusion of syscall is dependent on arch #include <sys/syscall.h> #endif #if defined(__linux__) #include <linux/unistd.h> +// NOLINTNEXTLINE - inclusion of syscall is dependent on arch #include <sys/syscall.h> #endif @@ -63,7 +66,7 @@ namespace art { -using android::base::ReadFileToString; +using android::base::ReadFileToString; // NOLINT - ReadFileToString is actually used using android::base::StringPrintf; #if defined(__arm__) @@ -90,7 +93,7 @@ bool TouchAndFlushCacheLinesWithinPage(uintptr_t start, uintptr_t limit, size_t CHECK_LT(start, limit); CHECK_EQ(RoundDown(start, kPageSize), RoundDown(limit - 1, kPageSize)) << "range spans pages"; // Declare a volatile variable so the compiler does not elide reads from the page being touched. - volatile uint8_t v = 0; + [[maybe_unused]] volatile uint8_t v = 0; for (size_t i = 0; i < attempts; ++i) { // Touch page to maximize chance page is resident. v = *reinterpret_cast<uint8_t*>(start); |