diff options
| author | 2017-10-12 21:34:08 +0000 | |
|---|---|---|
| committer | 2017-10-12 21:34:08 +0000 | |
| commit | 4d6bb5a8b07850319bd020a8d7d0dad44dd50075 (patch) | |
| tree | b231d9ede6518d0c77aef209e357f65562e23f53 | |
| parent | b6dabc881921313ea67ad04315d513f5beb8a70c (diff) | |
| parent | a50a467030fbf6527e5e052b4c981cad85bc5de4 (diff) | |
Merge "Use -Werror in frameworks/native/services/inputflinger"
| -rw-r--r-- | services/inputflinger/Android.bp | 3 | ||||
| -rw-r--r-- | services/inputflinger/EventHub.cpp | 6 | ||||
| -rw-r--r-- | services/inputflinger/InputDispatcher.cpp | 2 | ||||
| -rw-r--r-- | services/inputflinger/host/Android.bp | 4 | ||||
| -rw-r--r-- | services/inputflinger/tests/Android.bp | 6 |
5 files changed, 12 insertions, 9 deletions
diff --git a/services/inputflinger/Android.bp b/services/inputflinger/Android.bp index 4fd98e2a7e..238cba362c 100644 --- a/services/inputflinger/Android.bp +++ b/services/inputflinger/Android.bp @@ -37,6 +37,9 @@ cc_library_shared { ], cflags: [ + "-Wall", + "-Wextra", + "-Werror", "-Wno-unused-parameter", // TODO: Move inputflinger to its own process and mark it hidden //-fvisibility=hidden diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp index d2f89959e1..2348d92621 100644 --- a/services/inputflinger/EventHub.cpp +++ b/services/inputflinger/EventHub.cpp @@ -69,12 +69,6 @@ namespace android { static const char *WAKE_LOCK_ID = "KeyEvents"; static const char *DEVICE_PATH = "/dev/input"; -/* return the larger integer */ -static inline int max(int v1, int v2) -{ - return (v1 > v2) ? v1 : v2; -} - static inline const char* toString(bool value) { return value ? "true" : "false"; } diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp index 2efb340eba..043d157c7d 100644 --- a/services/inputflinger/InputDispatcher.cpp +++ b/services/inputflinger/InputDispatcher.cpp @@ -1135,8 +1135,6 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, INJECTION_PERMISSION_DENIED }; - nsecs_t startTime = now(); - // For security reasons, we defer updating the touch state until we are sure that // event injection will be allowed. int32_t displayId = entry->displayId; diff --git a/services/inputflinger/host/Android.bp b/services/inputflinger/host/Android.bp index b8e9bce4bd..775dbdc658 100644 --- a/services/inputflinger/host/Android.bp +++ b/services/inputflinger/host/Android.bp @@ -32,6 +32,8 @@ cc_library_shared { ], cflags: [ + "-Wall", + "-Werror", "-Wno-unused-parameter", // TODO: Move inputflinger to its own process and mark it hidden //-fvisibility=hidden @@ -47,6 +49,8 @@ cc_binary { srcs: ["main.cpp"], + cflags: ["-Wall", "-Werror"], + shared_libs: [ "libbinder", "libinputflingerhost", diff --git a/services/inputflinger/tests/Android.bp b/services/inputflinger/tests/Android.bp index 29d93f034b..a49c8c84c7 100644 --- a/services/inputflinger/tests/Android.bp +++ b/services/inputflinger/tests/Android.bp @@ -7,7 +7,11 @@ cc_test { "InputDispatcher_test.cpp", ], test_per_src: true, - cflags: ["-Wno-unused-parameter"], + cflags: [ + "-Wall", + "-Werror", + "-Wno-unused-parameter", + ], shared_libs = [ "libcutils", "liblog", |