fix warnings, disable empty statement warning by default
authorMatthias Braun <matze@braunis.de>
Fri, 14 Dec 2007 16:52:36 +0000 (16:52 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 14 Dec 2007 16:52:36 +0000 (16:52 +0000)
[r18742]

adt/util.h
lexer.c
warning.c

index 19a7bf8..21b41e2 100644 (file)
@@ -16,7 +16,7 @@
  */
 #define COMPILETIME_ASSERT(x, name)    \
        static __attribute__((unused)) void compiletime_assert_##name (int h) { \
-               switch(h) { case 0:     case (x): ; } \
+               switch(h) { case 0:     case (x): {} } \
        }
 
 /**
diff --git a/lexer.c b/lexer.c
index 84e6c24..7c61082 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -96,11 +96,11 @@ static inline void next_char(void);
                        next_char();                      \
                }                                     \
                lexer_token.source_position.linenr++; \
-               code;                                 \
+               code                                  \
        case '\n':                                \
                next_char();                          \
                lexer_token.source_position.linenr++; \
-               code;
+               code
 
 #define eat(c_type)  do { assert(c == c_type); next_char(); } while(0)
 
index 8f5bfc8..f2429d6 100644 (file)
--- a/warning.c
+++ b/warning.c
@@ -55,7 +55,7 @@ void set_warning_opt(const char *const opt)
 warning_t warning = {
        .char_subscripts               = true,
        .check_format                  = true,
-       .empty_statement               = true,
+       .empty_statement               = false,
        .fatal_errors                  = false,
        .implicit_function_declaration = true,
        .implicit_int                  = true,