[gnome-builder] build: fix some warnings reported by clang



commit 85e1c58aaa98285ae129293feab3cd62b4d46f99
Author: Christian Hergert <christian hergert me>
Date:   Thu May 7 20:04:28 2015 -0700

    build: fix some warnings reported by clang

 contrib/egg/egg-counter.c                 |    5 +++++
 libide/clang/ide-clang-service.c          |    2 +-
 libide/clang/ide-clang-translation-unit.c |    1 -
 3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/contrib/egg/egg-counter.c b/contrib/egg/egg-counter.c
index b8136c1..eda1d80 100644
--- a/contrib/egg/egg-counter.c
+++ b/contrib/egg/egg-counter.c
@@ -16,6 +16,10 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
 #include <glib/gprintf.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
@@ -23,6 +27,7 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "egg-counter.h"
diff --git a/libide/clang/ide-clang-service.c b/libide/clang/ide-clang-service.c
index 2e45a45..e7f2942 100644
--- a/libide/clang/ide-clang-service.c
+++ b/libide/clang/ide-clang-service.c
@@ -289,7 +289,7 @@ ide_clang_service_parse_worker (GTask        *task,
   code = clang_parseTranslationUnit2 (request->index,
                                       request->source_filename,
                                       argv, argc,
-                                      (struct CXUnsavedFile *)ar->data,
+                                      (struct CXUnsavedFile *)(void *)ar->data,
                                       ar->len,
                                       request->options,
                                       &tu);
diff --git a/libide/clang/ide-clang-translation-unit.c b/libide/clang/ide-clang-translation-unit.c
index 55c3cdc..5ec747b 100644
--- a/libide/clang/ide-clang-translation-unit.c
+++ b/libide/clang/ide-clang-translation-unit.c
@@ -682,7 +682,6 @@ ide_clang_translation_unit_code_complete_async (IdeClangTranslationUnit *self,
                                                 gpointer                 user_data)
 {
   g_autoptr(GTask) task = NULL;
-  g_autofree gchar *path = NULL;
   CodeCompleteState *state;
   IdeContext *context;
   IdeUnsavedFiles *unsaved_files;


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