Commit graph

3 commits

Author SHA1 Message Date
Greg Hackmann
dc80973726 libadf: convert to C++
Both humans and the clang static analyzer find libadf's error handling
confusing.

Now that the platform has better C++ support, we can clean up things up
by switching to C++ and using STL + RAII in targeted parts of the code.
This isn't a complete rewrite in idiomatic C++, but it's enough to get
rid of all the "goto" statements (and the false-positive memory leaks
found by clang's static analyzer).

Bug: 27125399

Test: WITH_STATIC_ANALYZER=1 mmm system/core/adf/libadf
Test: /data/nativetest/adf-unit-tests/adf-unit-tests (on Nexus 9)
Test: /data/nativetest64/adf-unit-tests/adf-unit-tests (on Nexus 9)
Change-Id: Ie9dd5d5dc424d1a3ddcc3cba836fce04190f46fd
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-02-22 21:18:48 +00:00
Greg Hackmann
09f8f986a9 libadf: adf_test: fix clang + kati build
kati needs us to add "tests" as a subdir of the libadf Android.bp.
clang also requires an explicit definition of AdfTest::dev_id where
g++ does not.

Test: mmm system/core/adf/libadf
Test: /data/nativetest64/adf-unit-tests/adf-unit-tests (on Nexus 9)
Change-Id: I1fc371af1b5b115f088edd963a87e6647a52882b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-01-31 22:55:46 +00:00
Dan Willemsen
45f05240c2 Convert more Android.mk files to Android.bp
These modules have their dependencies satisfied, and aren't doing
anything strange.

Change-Id: I72039a15256cbd5e5eee0d79a15d66d74a6c087d
2016-07-13 17:41:45 -07:00