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 <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>
This commit is contained in:
Cherry Mui 2021-11-11 12:52:45 -05:00
parent 73a4bbb0df
commit 84277bfd07
1 changed files with 3 additions and 2 deletions

View 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();
}