summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author George Burgess IV <gbiv@google.com> 2017-07-12 03:00:43 +0000
committer android-build-merger <android-build-merger@google.com> 2017-07-12 03:00:43 +0000
commit5987ab35cacb508fdeaaed0ee299e540566f9c5c (patch)
treed32e406db3c958640993a315cca6887c0f4d575d
parentd7c0357277fa53844b18c34788aee5ac36ec0406 (diff)
parent8a4be2a6aebbdcfa576b82e544fc501112ebab35 (diff)
Merge "app_main: silence static analyzer warnings" am: cf188f664a
am: 8a4be2a6ae Change-Id: Ic7b6e1092261a0e76fc84b213166729ea3451166
-rw-r--r--cmds/app_process/app_main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index e56417b82fc0..1671337511b7 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -235,6 +235,9 @@ int main(int argc, char* const argv[])
for (i = 0; i < argc; i++) {
if (known_command == true) {
runtime.addOption(strdup(argv[i]));
+ // The static analyzer gets upset that we don't ever free the above
+ // string. Since the allocation is from main, leaking it doesn't seem
+ // problematic. NOLINTNEXTLINE
ALOGV("app_process main add known option '%s'", argv[i]);
known_command = false;
continue;
@@ -258,6 +261,9 @@ int main(int argc, char* const argv[])
}
runtime.addOption(strdup(argv[i]));
+ // The static analyzer gets upset that we don't ever free the above
+ // string. Since the allocation is from main, leaking it doesn't seem
+ // problematic. NOLINTNEXTLINE
ALOGV("app_process main add option '%s'", argv[i]);
}