aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2021-02-04 15:18:36 -0800
committerGeorge Burgess <gbiv@chromium.org>2021-02-05 18:02:45 +0000
commit7ed03fe8ca71f549d566d4633b6d8f1e9eb7d597 (patch)
tree8d93acd2cab3786c72baf5b09d38a0521dfd21c8 /compiler_wrapper
parent235f72a0dceb95dd50b9a5e4c5485d8158dfb16a (diff)
downloadtoolchain-utils-7ed03fe8ca71f549d566d4633b6d8f1e9eb7d597.tar.gz
compiler_wrapper: make a loop c89-compatible
building this on the CQ is failing because this loop uses the c99 feature declaring something in the first clause of a for loop. BUG=None TEST=CQ Change-Id: I92729d30bd392c46e2b1183b92874212bdc59d6f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2676930 Tested-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'compiler_wrapper')
-rw-r--r--compiler_wrapper/libc_exec.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler_wrapper/libc_exec.go b/compiler_wrapper/libc_exec.go
index 09f8be85..a7a561bc 100644
--- a/compiler_wrapper/libc_exec.go
+++ b/compiler_wrapper/libc_exec.go
@@ -21,7 +21,8 @@ package main
// // crbug.com/1166017: we're (very rarely) getting ERESTARTSYS on some builders.
// // Documentation indicates that this is a bug in the kernel. Work around it by
// // retrying. 25 is an arbitrary retry number that Should Be Enough For Anyone(TM).
-// for (int i = 0; i < 25; i++) {
+// int i = 0;
+// for (; i < 25; i++) {
// execve(pathname, argv, envp);
// if (errno != 512) {
// break;