Commit 4102e6ff authored by Alberto Donizetti's avatar Alberto Donizetti

runtime/cgo: use size_t in sizeof result comparison

When a variable of type int is compared with sizeof's return
value, gcc warns:

  comparison between signed and unsigned integer expressions

Change the type of a couple loop indices that looped over sizeof from
int to size_t to silence the warnings.

Fixes #25411

Change-Id: I2c7858f84237e77945651c7b1b6a75b97edcef65
Reviewed-on: https://go-review.googlesource.com/113335
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 3868a371
......@@ -29,7 +29,7 @@ x_cgo_sigaction(intptr_t signum, const go_sigaction_t *goact, go_sigaction_t *ol
int32_t ret;
struct sigaction act;
struct sigaction oldact;
int i;
size_t i;
_cgo_tsan_acquire();
......
......@@ -33,7 +33,7 @@ x_cgo_sigaction(intptr_t signum, const go_sigaction_t *goact, go_sigaction_t *ol
int32_t ret;
struct sigaction act;
struct sigaction oldact;
int i;
size_t i;
_cgo_tsan_acquire();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment