Skip to content

Commit 1a7e9af

Browse files
[release-branch.go1.16] runtime/cgo: add cast in C code to avoid C compiler warning
For #44340 Fixes #44346 Change-Id: Id80dd1f44a988b653933732afcc8e49a826affc4 Reviewed-on: https://go-review.googlesource.com/c/go/+/293209 Reviewed-by: Andrew G. Morgan <agm@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> (cherry picked from commit 07ef313) Reviewed-on: https://go-review.googlesource.com/c/go/+/293411 TryBot-Result: Go Bot <gobot@golang.org>
1 parent f21be2f commit 1a7e9af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/cgo/linux_syscall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ typedef struct {
3232

3333
#define SET_RETVAL(fn) \
3434
uintptr_t ret = (uintptr_t) fn ; \
35-
if (ret == -1) { \
35+
if (ret == (uintptr_t) -1) { \
3636
x->retval = (uintptr_t) errno; \
3737
} else \
3838
x->retval = ret

0 commit comments

Comments
 (0)