main.c: fixed gcc warning.

This commit is contained in:
Vysheng 2014-02-03 19:26:43 +04:00
parent 6f16f82a89
commit 051a64fb76

8
main.c
View File

@ -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);
}