main.c: fixed gcc warning.
This commit is contained in:
parent
6f16f82a89
commit
051a64fb76
8
main.c
8
main.c
@ -435,14 +435,18 @@ void print_backtrace (void) {
|
|||||||
|
|
||||||
void sig_segv_handler (int signum __attribute__ ((unused))) {
|
void sig_segv_handler (int signum __attribute__ ((unused))) {
|
||||||
set_terminal_attributes ();
|
set_terminal_attributes ();
|
||||||
(void) write (1, "SIGSEGV received\n", 18);
|
if (write (1, "SIGSEGV received\n", 18) < 0) {
|
||||||
|
// Sad thing
|
||||||
|
}
|
||||||
print_backtrace ();
|
print_backtrace ();
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sig_abrt_handler (int signum __attribute__ ((unused))) {
|
void sig_abrt_handler (int signum __attribute__ ((unused))) {
|
||||||
set_terminal_attributes ();
|
set_terminal_attributes ();
|
||||||
(void) write (1, "SIGABRT received\n", 18);
|
if (write (1, "SIGABRT received\n", 18) < 0) {
|
||||||
|
// Sad thing
|
||||||
|
}
|
||||||
print_backtrace ();
|
print_backtrace ();
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user