]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix C compilation error in TestCgoTracebackGoroutineProfile
authorCherry Mui <cherryyz@google.com>
Thu, 11 Nov 2021 17:52:45 +0000 (12:52 -0500)
committerCherry Mui <cherryyz@google.com>
Thu, 11 Nov 2021 18:32:21 +0000 (18:32 +0000)
Use C89 declaration. Also fix indentation.

Change-Id: Ib974eb32ac95610d0b0eca00ca3b139b388c73bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/363356
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/runtime/testdata/testprogcgo/gprof_c.c

index 6ddff445ad4a452d5b419e769162be2d28210a07..5c7cd77022113313245855c1bf3bffb6a838fa94 100644 (file)
@@ -21,9 +21,10 @@ void gprofCgoContext(void *arg) {
 
 void gprofCgoTraceback(void *arg) {
        // spend some time here so the P is more likely to be retaken.
-       for (volatile int i = 0; i < 123456789; i++);
+       volatile int i;
+       for (i = 0; i < 123456789; i++);
 }
 
 void CallGoSleep() {
-       GoSleep();
+       GoSleep();
 }