diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-27 22:01:21 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-27 22:01:21 +0000 |
commit | 2f6bdc73b914b478dabb7bdd0ad996a9e3567bda (patch) | |
tree | 17f53ee2af24fe35454919e28038c7a23d18b0fd /libgo | |
parent | 82a1c922605243e401ea56d1b6288e771dacf248 (diff) | |
download | gcc-2f6bdc73b914b478dabb7bdd0ad996a9e3567bda.tar.gz |
libgo/runtime: fix unused-result warning
Result of runtime_write is ignored, causing
an unused-result result warning (error in my
case, with -Werror=unused-result).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210987 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/runtime/proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index ed0c1a03ba6..c627ac1d5d3 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -1117,7 +1117,8 @@ runtime_needm(void) if(runtime_needextram) { // Can happen if C/C++ code calls Go from a global ctor. // Can not throw, because scheduler is not initialized yet. - runtime_write(2, "fatal error: cgo callback before cgo call\n", + int rv __attribute__((unused)); + rv = runtime_write(2, "fatal error: cgo callback before cgo call\n", sizeof("fatal error: cgo callback before cgo call\n")-1); runtime_exit(1); } |