Fix some warnings when compiled without clang.

Also fix format of inner preprocessor ifs.
Patch from Vincent Torri.
This commit is contained in:
Andy Williams 2015-02-15 17:53:00 +00:00
parent aae8ea89bb
commit d79ee5a19a
1 changed files with 8 additions and 4 deletions

View File

@ -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);
}