mirror of
https://github.com/golang/go
synced 2024-11-24 01:10:12 -07:00
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: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
3868a371a8
commit
4102e6ff56
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user