Use -Werror in hardware/libhardware/modules
* Remove unused local variables.
* Remove or comment out unused static functions.
* Fix trivial bugs found by unused value warnings.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I99389b883c89551850180d25241a35a40bb77b26
diff --git a/modules/vehicle/vehicle.c b/modules/vehicle/vehicle.c
index 66e29c0..66a2137 100644
--- a/modules/vehicle/vehicle.c
+++ b/modules/vehicle/vehicle.c
@@ -465,6 +465,9 @@
}
int ret_code = pthread_create(
&sub->thread, NULL, (void *(*)(void*))fake_event_thread, sub);
+ if (ret_code != 0) {
+ return -ret_code;
+ }
print_subscribe_info(impl);
pthread_mutex_unlock(&lock_);
return 0;