diff options
Diffstat (limited to 'src/libmain/stack.cc')
-rw-r--r-- | src/libmain/stack.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmain/stack.cc b/src/libmain/stack.cc index 64df95547e0b..41b617d98be2 100644 --- a/src/libmain/stack.cc +++ b/src/libmain/stack.cc @@ -18,7 +18,7 @@ static void sigsegvHandler(int signo, siginfo_t * info, void * ctx) the stack pointer. Unfortunately, getting the stack pointer is not portable. */ bool haveSP = true; - char * sp; + char * sp = 0; #if defined(__x86_64__) && defined(REG_RSP) sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_RSP]; #elif defined(REG_ESP) @@ -32,7 +32,7 @@ static void sigsegvHandler(int signo, siginfo_t * info, void * ctx) if (diff < 0) diff = -diff; if (diff < 4096) { char msg[] = "error: stack overflow (possible infinite recursion)\n"; - write(2, msg, strlen(msg)); + (void) write(2, msg, strlen(msg)); _exit(1); // maybe abort instead? } } |