commit | 4157fa4dd40bb9575da394e506c1b8c13f94b107 | [log] [tgz] |
---|---|---|
author | George Burgess IV <gbiv@google.com> | Sat Feb 17 21:56:56 2018 -0800 |
committer | George Burgess IV <gbiv@google.com> | Sat Feb 17 22:18:34 2018 -0800 |
tree | 2f4709a10b6b2bd7d1287729c26a06b8f521a0dd | |
parent | 5012f4cb8bac801991bd122bbcc412d37fdf304d [diff] |
Fix 2 memory leaks The return type in either case is a std::string, so strdups aren't necessary. This also applies a small reformat, caused by a clang-format hook. Caught by the static analyzer: system/tools/hidl/ConstantExpression.cpp:402:9: warning: Potential memory leak system/tools/hidl/ConstantExpression.cpp:428:9: warning: Potential memory leak Bug: None Test: Reran the analyzer; no more memory leak complaints. Change-Id: I8a51061886ce7e92d57265c52f0d5a224540d57e
croot make hidl-gen
hidl-gen -o output-path -L language (-r interface-root) fqname output-path: directory to store the output files. language: output file for given language. e.g.c++, vts.. fqname: fully qualified name of the input files. For singe file input, follow the format: package@version::fileName For directory input, follow the format: package@version interface-root(optional): prefix and root path for fqname. If not set, use the default prefix: android.hardware and default root path defined in $TOP. examples: croot hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -L hash -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0