diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-02-17 12:03:13 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-02-18 03:06:52 +0000 |
commit | 1a7e9af1536280fc90a9adea9c3ae5b4be968898 (patch) | |
tree | 8fe80404ed2eda09fc2fc377186d1bfe3d58f841 /src | |
parent | f21be2fdc6f1becdbed1592ea0b245cdeedc5ac8 (diff) | |
download | go-1a7e9af1536280fc90a9adea9c3ae5b4be968898.tar.gz go-1a7e9af1536280fc90a9adea9c3ae5b4be968898.zip |
[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 07ef3135253321176704bce6e629a07ac02bf1c6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/293411
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/runtime/cgo/linux_syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/cgo/linux_syscall.c b/src/runtime/cgo/linux_syscall.c index 56f3d67d8b..59761c8b40 100644 --- a/src/runtime/cgo/linux_syscall.c +++ b/src/runtime/cgo/linux_syscall.c @@ -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 |