summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--girepository/girparser.c9
-rw-r--r--tools/compiler.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 0a06aa08..0ab6259e 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -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
diff --git a/tools/compiler.c b/tools/compiler.c
index 7e0a6004..350b906d 100644
--- a/tools/compiler.c
+++ b/tools/compiler.c
@@ -107,8 +107,10 @@ write_out_typelib (gchar *prefix,
if (output == NULL)
{
file = stdout;
+ file_obj = NULL;
filename = NULL;
tmp_filename = NULL;
+ tmp_file_obj = NULL;
#ifdef G_OS_WIN32
setmode (fileno (file), _O_BINARY);
#endif