From 21a9ca8ccedfcf5a8f82e0ea955b5ed2eaa6aca1 Mon Sep 17 00:00:00 2001 From: Laurent Thomas Date: Thu, 9 Sep 2021 11:46:34 +0200 Subject: [PATCH] gcc warning fix --- executables/softmodem-common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/executables/softmodem-common.c b/executables/softmodem-common.c index bdec733408..01aec42c01 100644 --- a/executables/softmodem-common.c +++ b/executables/softmodem-common.c @@ -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);