From 051a64fb767a4adac5a5b546a0c07870d148bf7f Mon Sep 17 00:00:00 2001 From: Vysheng Date: Mon, 3 Feb 2014 19:26:43 +0400 Subject: [PATCH] main.c: fixed gcc warning. --- main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index ff5859d..562e351 100644 --- a/main.c +++ b/main.c @@ -435,14 +435,18 @@ void print_backtrace (void) { void sig_segv_handler (int signum __attribute__ ((unused))) { set_terminal_attributes (); - (void) write (1, "SIGSEGV received\n", 18); + if (write (1, "SIGSEGV received\n", 18) < 0) { + // Sad thing + } print_backtrace (); exit (EXIT_FAILURE); } void sig_abrt_handler (int signum __attribute__ ((unused))) { set_terminal_attributes (); - (void) write (1, "SIGABRT received\n", 18); + if (write (1, "SIGABRT received\n", 18) < 0) { + // Sad thing + } print_backtrace (); exit (EXIT_FAILURE); }