aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2014-05-27 22:01:21 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2014-05-27 22:01:21 +0000
commit25e4b0497ba7b0812e17f4667d8bd4a9213a0d34 (patch)
tree17f53ee2af24fe35454919e28038c7a23d18b0fd
parentb8aac16d88d93a5a299776e4802f73fcf897e9ee (diff)
downloadgcc-25e4b0497ba7b0812e17f4667d8bd4a9213a0d34.zip
gcc-25e4b0497ba7b0812e17f4667d8bd4a9213a0d34.tar.gz
gcc-25e4b0497ba7b0812e17f4667d8bd4a9213a0d34.tar.bz2
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). From-SVN: r210987
-rw-r--r--libgo/runtime/proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index ed0c1a0..c627ac1 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);
}