diff options
| author | Cherry Mui <cherryyz@google.com> | 2021-11-11 12:52:45 -0500 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2021-11-11 18:32:21 +0000 |
| commit | 84277bfd07dad771b9978149bdaed8aa16ed8982 (patch) | |
| tree | 52d403b0e17d0aa9d0e076ffaaae982278564859 /src/runtime | |
| parent | 73a4bbb0df36d85d1ab8cb12d220d1d56e4049ec (diff) | |
| download | go-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')
| -rw-r--r-- | src/runtime/testdata/testprogcgo/gprof_c.c | 5 |
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(); } |
