From 5fa57f6afc17c0285a618e274c8284840af9c7af Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 14 Jul 2021 17:25:16 -0700 Subject: [PATCH] idmap2: fix for compiler update. Suppress below errors: include/idmap2/Idmap.h:126:12: error: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list,-warnings-as-errors] return StringPiece(target_path_); ^~~~~~~~~~~~ ~ { } gen/aidl/android/os/BnIdmap2.h:6:1: error: nested namespaces can be concatenated [modernize-concat-nested-namespaces,-warnings-as-errors] namespace android { ^~~~~~~~~~~~~~~~~~~ namespace android::os Bug: 193712493 Test: build with the next compiler Change-Id: I14297355dd92c2bbf4bd24da95cfa868b427739e --- cmds/idmap2/Android.bp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmds/idmap2/Android.bp b/cmds/idmap2/Android.bp index 5212d80814012..aad5d23f85469 100644 --- a/cmds/idmap2/Android.bp +++ b/cmds/idmap2/Android.bp @@ -35,8 +35,10 @@ cc_defaults { tidy_checks_as_errors: [ "modernize-*", "-modernize-avoid-c-arrays", + "-modernize-concat-nested-namespaces", "-modernize-pass-by-value", "-modernize-replace-disallow-copy-and-assign-macro", + "-modernize-return-braced-init-list", "-modernize-use-equals-default", "-modernize-use-nodiscard", "-modernize-use-override",