@@ -245,10 +245,6 @@ static const char *signal_name(int signo)
245245 return " " ;
246246}
247247
248-
249- // 32 vs. 64bit
250- #define ADDRESSDISPLAYLENGTH ((sizeof (long )==8 )?12 :8 )
251-
252248/*
253249 * Try to print the callstack.
254250 * That is very sensitive to the operating system, hardware, compiler and runtime!
@@ -257,14 +253,15 @@ static const char *signal_name(int signo)
257253static void print_stacktrace (FILE* f, bool demangling, int maxdepth)
258254{
259255#if defined(USE_UNIX_BACKTRACE_SUPPORT)
256+ // 32 vs. 64bit
257+ #define ADDRESSDISPLAYLENGTH ((sizeof (long )==8 )?12 :8 )
260258 void *array[32 ]= {0 }; // the less resources the better...
261259 const int depth = backtrace (array, (int )GetArrayLength (array));
262260 const int offset=3 ; // the first two entries are simply within our own exception handling code, third is within libc
263261 if (maxdepth<0 )
264262 maxdepth=depth+offset;
265263 else
266264 maxdepth+=offset;
267- printf (" maxdepth=%d\n " , maxdepth);
268265 char **symbolstrings = backtrace_symbols (array, depth);
269266 if (symbolstrings) {
270267 fputs (" Callstack:\n " , f);
@@ -308,6 +305,7 @@ static void print_stacktrace(FILE* f, bool demangling, int maxdepth)
308305 } else {
309306 fputs (" Callstack could not be obtained\n " , f);
310307 }
308+ #undef ADDRESSDISPLAYLENGTH
311309#endif
312310}
313311
@@ -617,7 +615,7 @@ static void writeMemoryErrorDetails(FILE* f, PEXCEPTION_POINTERS ex, const char*
617615}
618616
619617/*
620- * Any evaluation of the information about the exception needs to be done here!
618+ * Any evaluation of the exception needs to be done here!
621619 */
622620static int filterException (int code, PEXCEPTION_POINTERS ex)
623621{
@@ -714,7 +712,7 @@ int CppCheckExecutor::check_wrapper(CppCheck& cppcheck, int argc, const char* co
714712 __try {
715713 return check_internal (cppcheck, argc, argv);
716714 } __except (filterException (GetExceptionCode (), GetExceptionInformation ())) {
717- // reporting to stdout may not be helpful within a GUI application..
715+ // reporting to stdout may not be helpful within a GUI application...
718716 fputs (" Please report this to the cppcheck developers!\n " , f);
719717 return -1 ;
720718 }
0 commit comments