Bug 585584: Fix warnings in girparser backtrace functionality and compiler.c

This commit is contained in:
C. Scott Ananian 2009-06-12 11:52:56 -04:00
parent 5917b5ba42
commit 1a256fd7bd

View File

@ -29,6 +29,10 @@
#include "gtypelib.h"
#include "config.h"
#if defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS)
# include <execinfo.h>
#endif
struct _GIrParser
{
gchar **includes;
@ -276,9 +280,8 @@ backtrace_stderr (void)
{
#if defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS)
void *array[50];
int size;
int size, i;
char **strings;
size_t i;
size = backtrace (array, 50);
strings = (char**) backtrace_symbols (array, size);
@ -288,7 +291,7 @@ backtrace_stderr (void)
for (i = 0; i < size; i++)
fprintf (stderr, "%s\n", strings[i]);
fprintf (stderr, "--- END BACKTRACE ---\n", size);
fprintf (stderr, "--- END BACKTRACE ---\n");
free (strings);
#endif