OSDN Git Service

runtime: Fix build failures with -D_FORTIFY_SOURCE=2.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Dec 2012 06:15:14 +0000 (06:15 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Dec 2012 06:15:14 +0000 (06:15 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@194115 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/runtime/print.c

index 5a8e47e..fcf57ea 100644 (file)
@@ -17,7 +17,10 @@ gwrite(const void *v, int32 n)
        G* g = runtime_g();
 
        if(g == nil || g->writebuf == nil) {
-               runtime_write(2, v, n);
+               // Avoid -D_FORTIFY_SOURCE problems.
+               int rv __attribute__((unused));
+
+               rv = runtime_write(2, v, n);
                return;
        }