ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=d79ee5a19a6fd4b3075e4bbbc81822b85c3ad1db

commit d79ee5a19a6fd4b3075e4bbbc81822b85c3ad1db
Author: Andy Williams <[email protected]>
Date:   Sun Feb 15 17:53:00 2015 +0000

    Fix some warnings when compiled without clang.
    
    Also fix format of inner preprocessor ifs.
    Patch from Vincent Torri.
---
 src/bin/editor/edi_editor.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index ab49573..947ef46 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -19,6 +19,8 @@
 
 #include "edi_private.h"
 
+#if HAVE_LIBCLANG
+
 #define Edi_Color const char *
 
 static Edi_Color EDI_COLOR_FOREGROUND = "<color=#ffffff>";
@@ -38,6 +40,8 @@ static Edi_Color EDI_COLOR_SEVIRITY_IGNORED = 
"<backing_color=#000000>";
 static Edi_Color EDI_COLOR_SEVIRITY_NOTE = "<backing_color=#ff9900>";
 static Edi_Color EDI_COLOR_SEVIRITY_WARNING = "<backing_color=#ff9900>";
 
+#endif
+
 static char *_default_font;
 
 typedef struct
@@ -552,7 +556,7 @@ _clang_show_highlighting(void *data)
 
         _edi_range_color_set(editor, range, color);
 
-#if CLANG_DEBUG
+# if CLANG_DEBUG
         const char *kind = NULL;
         switch (clang_getTokenKind(editor->tokens[i])) {
            case CXToken_Punctuation: kind = "Punctuation"; break;
@@ -571,7 +575,7 @@ _clang_show_highlighting(void *data)
         }
 
         printf("\n");
-#endif
+# endif
      }
 
 // TODO clear these when we reset next time
@@ -620,11 +624,11 @@ _clang_load_errors(const char *path EINA_UNUSED, 
Edi_Editor *editor)
 
         _edi_range_color_set(editor, range, color);
 
-#if CLANG_DEBUG
+# if CLANG_DEBUG
         CXString str = clang_formatDiagnostic(diag, 
clang_defaultDiagnosticDisplayOptions());
         printf("DEBUG: Diag:%s\n", clang_getCString(str));
         clang_disposeString(str);
-#endif
+# endif
 
         clang_disposeDiagnostic(diag);
      }

-- 


Reply via email to