gcc warning fix

This commit is contained in:
Laurent Thomas
2021-09-09 11:46:34 +02:00
parent 6086d9c093
commit 21a9ca8cce
+4 -3
View File
@@ -180,12 +180,13 @@ void softmodem_printresources(int sig, telnet_printfunc_t pf) {
}
void signal_handler(int sig) {
void *array[10];
size_t size;
//void *array[10];
//size_t size;
if (sig==SIGSEGV) {
// get void*'s for all entries on the stack
/*
/* backtrace uses malloc, that is not good in signal handlers
* I let the code, because it would be nice to make it better
size = backtrace(array, 10);
// print out all the frames to stderr
fprintf(stderr, "Error: signal %d:\n", sig);