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
This commit is contained in:
Yabin Cui
2021-07-14 17:25:16 -07:00
parent 245ce4d049
commit 5fa57f6afc

View File

@@ -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",