Commit 051a64fb authored by Vysheng's avatar Vysheng

main.c: fixed gcc warning.

parent 6f16f82a
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment