aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-01-08 15:28:38 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-01-09 20:20:49 +0100
commitc5f38186d296b1e4ce59cb51889bce481cce266d (patch)
tree35898518a1507f8acc4e5b3ee0529eb9a0c95d85 /executor/common.h
parent43d5c364a2cad2f4673499a74345088904b2c876 (diff)
csource: compile with -Werror
Check for compiler warnings during compilation. Don't require -std=c99. Fix existing compiler warnings.
Diffstat (limited to 'executor/common.h')
-rw-r--r--executor/common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/executor/common.h b/executor/common.h
index 6fc798280..34601df0f 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -59,8 +59,9 @@ const int kRetryStatus = 69;
// So call the syscall directly.
__attribute__((noreturn)) void doexit(int status)
{
+ volatile unsigned i;
syscall(__NR_exit_group, status);
- for (volatile unsigned i = 0;; i++) {
+ for (i = 0;; i++) {
}
}
@@ -693,7 +694,6 @@ void loop()
uint64_t start = current_time_ms();
for (;;) {
int res = waitpid(-1, &status, __WALL | WNOHANG);
- int errno0 = errno;
if (res == pid)
break;
usleep(1000);