aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2021-11-11 12:52:45 -0500
committerCherry Mui <cherryyz@google.com>2021-11-11 18:32:21 +0000
commit84277bfd07dad771b9978149bdaed8aa16ed8982 (patch)
tree52d403b0e17d0aa9d0e076ffaaae982278564859 /src/runtime/testdata
parent73a4bbb0df36d85d1ab8cb12d220d1d56e4049ec (diff)
downloadgo-84277bfd07dad771b9978149bdaed8aa16ed8982.tar.xz
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>
Diffstat (limited to 'src/runtime/testdata')
-rw-r--r--src/runtime/testdata/testprogcgo/gprof_c.c5
1 files changed, 3 insertions, 2 deletions
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();
}