Use -Werror in device/google/wahoo

* Remove unused variables.
* Return result of registerAsService().

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I79d1add6190e835de20a0b0c247bbbb259096c14
This commit is contained in:
Chih-Hung Hsieh
2017-11-02 15:22:43 -07:00
parent 1898ea64c2
commit 7d0bdbefcd
4 changed files with 9 additions and 5 deletions

View File

@@ -17,6 +17,10 @@ cc_binary {
relative_install_path: "hw",
init_rc: ["android.hardware.usb@1.1-service.wahoo.rc"],
srcs: ["service.cpp", "Usb.cpp"],
cflags: [
"-Wall",
"-Werror",
],
shared_libs: [
"libbase",
"libhidlbase",

View File

@@ -357,8 +357,6 @@ Status getTypeCPortNamesHelper(std::unordered_map<std::string, bool> *names) {
dp = opendir("/sys/class/typec");
if (dp != NULL) {
int32_t ports = 0;
int32_t current = 0;
struct dirent *ep;
while ((ep = readdir(dp))) {

View File

@@ -17,6 +17,10 @@ cc_binary {
relative_install_path: "hw",
init_rc: ["android.hardware.vibrator@1.1-service.wahoo.rc"],
srcs: ["service.cpp", "Vibrator.cpp"],
cflags: [
"-Wall",
"-Werror",
],
shared_libs: [
"libhidlbase",
"libcutils",

View File

@@ -193,9 +193,7 @@ status_t registerVibratorService() {
std::move(state), std::move(rtpinput), std::move(mode),
std::move(sequencer), std::move(scale), std::move(ctrlloop), std::move(lptrigger));
vibrator->registerAsService();
return OK;
return vibrator->registerAsService();
}
int main() {