From: Cherry Mui Date: Thu, 11 Nov 2021 17:52:45 +0000 (-0500) Subject: runtime: fix C compilation error in TestCgoTracebackGoroutineProfile X-Git-Tag: go1.18beta1~378 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=84277bfd07dad771b9978149bdaed8aa16ed8982;p=gostls13.git runtime: fix C compilation error in TestCgoTracebackGoroutineProfile Use C89 declaration. Also fix indentation. Change-Id: Ib974eb32ac95610d0b0eca00ca3b139b388c73bd Reviewed-on: https://go-review.googlesource.com/c/go/+/363356 Trust: Cherry Mui Run-TryBot: Cherry Mui TryBot-Result: Go Bot Reviewed-by: Bryan C. Mills --- diff --git a/src/runtime/testdata/testprogcgo/gprof_c.c b/src/runtime/testdata/testprogcgo/gprof_c.c index 6ddff445ad..5c7cd77022 100644 --- a/src/runtime/testdata/testprogcgo/gprof_c.c +++ b/src/runtime/testdata/testprogcgo/gprof_c.c @@ -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(); }