blob: ca0e3320c9d04908beda5a7336e8ce0e37478193 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001include limits.h to avoid UINT_MAX undefined compiling error.
2remove the unused assign which caused compiling error with -Werror.
3
4Upstream-Status: Pending
5
6Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
7---
8
9diff --git a/usl/usl_timer.c b/usl/usl_timer.c
10index 734b820..fda752b 100644
11--- a/usl/usl_timer.c
12+++ b/usl/usl_timer.c
13@@ -42,6 +42,7 @@
14 #include <signal.h>
15 #include <string.h>
16 #include <sys/time.h>
17+#include <limits.h>
18
19 #include "usl.h"
20
21@@ -87,14 +88,13 @@ void (*usl_timer_tick_hook)(void);
22 */
23 void usl_timer_tick(void)
24 {
25- int result;
26 char msg = '\0';
27
28 usl_tick++;
29
30 if (!usl_tick_pending) {
31 usl_tick_pending = 1;
32- result = write(usl_tick_pipe[1], &msg, sizeof(msg));
33+ write(usl_tick_pipe[1], &msg, sizeof(msg));
34 }
35 }
36
37@@ -111,11 +111,10 @@ static void usl_timer_tick_handler(int fd, void *arg)
38 struct usl_ord_list_head *tmp;
39 struct usl_list_head *iwalk;
40 struct usl_list_head *itmp;
41- int result;
42 char msg;
43 USL_LIST_HEAD(expire_list);
44
45- result = usl_fd_read(usl_tick_pipe[0], &msg, sizeof(msg));
46+ usl_fd_read(usl_tick_pipe[0], &msg, sizeof(msg));
47 usl_tick_pending = 0;
48
49 usl_list_for_each(walk, tmp, &usl_timer_list) {