[gobject-introspection] Bug 585584: Fix warnings in girparser backtrace functionality and compiler.c



commit 8e893b3df0723dce6af86586c0cf1e6bc355f21d
Author: C. Scott Ananian <cscott litl com>
Date:   Fri Jun 12 11:52:56 2009 -0400

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

 girepository/girparser.c |    9 ++++++---
 tools/compiler.c         |    2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 0a06aa0..0ab6259 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 7e0a600..350b906 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]