hardware/libhardware_legacy
修訂 | b8c948337d61f3176dad36b733594beda7145c18 (tree) |
---|---|
時間 | 2016-11-08 23:32:49 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
powerbtnd: include the header for string functions prototypes
Also fixes a warning of mismatching argument.
@@ -16,6 +16,7 @@ | ||
16 | 16 | #include <fcntl.h> |
17 | 17 | #include <errno.h> |
18 | 18 | #include <dirent.h> |
19 | +#include <string.h> | |
19 | 20 | #include <cutils/log.h> |
20 | 21 | #include <linux/input.h> |
21 | 22 | #include <linux/uinput.h> |
@@ -130,7 +131,7 @@ int main() | ||
130 | 131 | struct input_event iev; |
131 | 132 | size_t res = read(pfds[i].fd, &iev, sizeof(iev)); |
132 | 133 | if (res < sizeof(iev)) { |
133 | - ALOGW("insufficient input data(%d)? fd=%d", res, pfds[i].fd); | |
134 | + ALOGW("insufficient input data(%zd)? fd=%d", res, pfds[i].fd); | |
134 | 135 | continue; |
135 | 136 | } |
136 | 137 | ALOGD("type=%d scancode=%d value=%d from fd=%d", iev.type, iev.code, iev.value, pfds[i].fd); |