Skip to content

Commit

Permalink
runtime/cgo: add cast in C code to avoid C compiler warning
Browse files Browse the repository at this point in the history
Fixes #44340

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>
  • Loading branch information
ianlancetaylor committed Feb 18, 2021
1 parent 2f0da6d commit 07ef313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/cgo/linux_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ typedef struct {

#define SET_RETVAL(fn) \
uintptr_t ret = (uintptr_t) fn ; \
if (ret == -1) { \
if (ret == (uintptr_t) -1) { \
x->retval = (uintptr_t) errno; \
} else \
x->retval = ret
Expand Down

0 comments on commit 07ef313

Please sign in to comment.