diff options
-rw-r--r-- | build/Android.bp | 1 | ||||
-rw-r--r-- | dexdump/Android.bp | 2 | ||||
-rw-r--r-- | dexdump/dexdump.cc | 12 | ||||
-rw-r--r-- | dexdump/dexdump_main.cc | 4 | ||||
-rw-r--r-- | dexlist/Android.bp | 6 | ||||
-rw-r--r-- | dexlist/dexlist.cc | 4 |
6 files changed, 12 insertions, 17 deletions
diff --git a/build/Android.bp b/build/Android.bp index 5f66308124..5f64c2d9f7 100644 --- a/build/Android.bp +++ b/build/Android.bp @@ -21,7 +21,6 @@ art_clang_tidy_errors = [ "bugprone-lambda-function-name", "bugprone-unused-raii", // Protect scoped things like MutexLock. "bugprone-virtual-near-miss", - "modernize-redundant-void-arg", "modernize-use-bool-literals", "modernize-use-nullptr", "performance-faster-string-find", diff --git a/dexdump/Android.bp b/dexdump/Android.bp index 3e576c82da..d15bbda4f4 100644 --- a/dexdump/Android.bp +++ b/dexdump/Android.bp @@ -17,12 +17,12 @@ cc_defaults { name: "dexdump_defaults", + defaults: ["art_defaults"], srcs: [ "dexdump_cfg.cc", "dexdump_main.cc", "dexdump.cc", ], - cflags: ["-Wall", "-Werror"], } art_cc_binary { diff --git a/dexdump/dexdump.cc b/dexdump/dexdump.cc index 95d88be27d..2cf05678c6 100644 --- a/dexdump/dexdump.cc +++ b/dexdump/dexdump.cc @@ -1800,18 +1800,18 @@ static void processDexFile(const char* fileName, // Iterate over all classes. char* package = nullptr; const u4 classDefsSize = pDexFile->GetHeader().class_defs_size_; - for (u4 i = 0; i < classDefsSize; i++) { - dumpClass(pDexFile, i, &package); + for (u4 j = 0; j < classDefsSize; j++) { + dumpClass(pDexFile, j, &package); } // for // Iterate over all method handles. - for (u4 i = 0; i < pDexFile->NumMethodHandles(); ++i) { - dumpMethodHandle(pDexFile, i); + for (u4 j = 0; j < pDexFile->NumMethodHandles(); ++j) { + dumpMethodHandle(pDexFile, j); } // for // Iterate over all call site ids. - for (u4 i = 0; i < pDexFile->NumCallSiteIds(); ++i) { - dumpCallSite(pDexFile, i); + for (u4 j = 0; j < pDexFile->NumCallSiteIds(); ++j) { + dumpCallSite(pDexFile, j); } // for // Free the last package allocated. diff --git a/dexdump/dexdump_main.cc b/dexdump/dexdump_main.cc index f4a3866088..cf0d1130dd 100644 --- a/dexdump/dexdump_main.cc +++ b/dexdump/dexdump_main.cc @@ -37,7 +37,7 @@ static const char* gProgName = "dexdump"; /* * Shows usage. */ -static void usage(void) { +static void usage() { LOG(ERROR) << "Copyright (C) 2007 The Android Open Source Project\n"; LOG(ERROR) << gProgName << ": [-a] [-c] [-d] [-e] [-f] [-h] [-i] [-j] [-l layout] [-o outfile]" " dexfile...\n"; @@ -64,7 +64,7 @@ int dexdumpDriver(int argc, char** argv) { gOptions.verbose = true; // Parse all arguments. - while (1) { + while (true) { const int ic = getopt(argc, argv, "acdefghijl:o:"); if (ic < 0) { break; // done diff --git a/dexlist/Android.bp b/dexlist/Android.bp index bd521acbc0..217a024357 100644 --- a/dexlist/Android.bp +++ b/dexlist/Android.bp @@ -14,18 +14,14 @@ art_cc_binary { name: "dexlist", + defaults: ["art_defaults"], host_supported: true, srcs: ["dexlist.cc"], - cflags: ["-Wall", "-Werror"], shared_libs: [ "libdexfile", "libartbase", "libbase" ], - // TODO: fix b/72216369 and remove the need for this. - include_dirs: [ - "art/runtime" // dex utils. - ], } art_cc_test { diff --git a/dexlist/dexlist.cc b/dexlist/dexlist.cc index c2514a1c52..23be19dd2e 100644 --- a/dexlist/dexlist.cc +++ b/dexlist/dexlist.cc @@ -197,7 +197,7 @@ static int processFile(const char* fileName) { /* * Shows usage. */ -static void usage(void) { +static void usage() { LOG(ERROR) << "Copyright (C) 2007 The Android Open Source Project\n"; LOG(ERROR) << gProgName << ": [-m p.c.m] [-o outfile] dexfile..."; LOG(ERROR) << ""; @@ -212,7 +212,7 @@ int dexlistDriver(int argc, char** argv) { memset(&gOptions, 0, sizeof(gOptions)); // Parse all arguments. - while (1) { + while (true) { const int ic = getopt(argc, argv, "o:m:"); if (ic < 0) { break; // done |