Skip to content

Commit 07ef313

Browse files
runtime/cgo: add cast in C code to avoid C compiler warning
Fixes #44340 Change-Id: Id80dd1f44a988b653933732afcc8e49a826affc4 Reviewed-on: https://go-review.googlesource.com/c/go/+/293209 Reviewed-by: Andrew G. Morgan <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Trust: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]>
1 parent 2f0da6d commit 07ef313

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/cgo/linux_syscall.c

+1-1
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)