fix whitespace errors
authorMatthias Braun <matze@braunis.de>
Tue, 15 Mar 2011 11:47:22 +0000 (12:47 +0100)
committerMatthias Braun <matze@braunis.de>
Tue, 15 Mar 2011 11:47:22 +0000 (12:47 +0100)
adt/util.h
ast2firm.c
driver/firm_cmdline.c
format_check.c
parser.c
win32/stdbool.h
wrappergen/write_fluffy.c
wrappergen/write_jna.c

index a3abdfc..61c3c7d 100644 (file)
@@ -34,9 +34,9 @@
  *
  * @note This uses the fact, that double case labels are not allowed.
  */
-#define COMPILETIME_ASSERT(x, name)    \
+#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): {} } \
        }
 
 /**
index ccb3ebc..50ab325 100644 (file)
@@ -2517,7 +2517,7 @@ static ir_node *handle_assume(dbg_info *dbi, const expression_t *expression)
        }
 }
 
-static ir_node *create_cast(dbg_info *dbgi,    ir_node *value_node,
+static ir_node *create_cast(dbg_info *dbgi, ir_node *value_node,
                             type_t *from_type, type_t *type)
 {
        type = skip_typeref(type);
@@ -5504,13 +5504,13 @@ static void asm_statement_to_firm(const asm_statement_t *statement)
        }
 }
 
-static void    ms_try_statement_to_firm(ms_try_statement_t *statement)
+static void ms_try_statement_to_firm(ms_try_statement_t *statement)
 {
        statement_to_firm(statement->try_statement);
        warningf(&statement->base.source_position, "structured exception handling ignored");
 }
 
-static void    leave_statement_to_firm(leave_statement_t *statement)
+static void leave_statement_to_firm(leave_statement_t *statement)
 {
        errorf(&statement->base.source_position, "__leave not supported yet");
 }
index d7e7075..da6ed06 100644 (file)
@@ -71,7 +71,7 @@ struct a_firm_be_opt firm_be_opt = {
   /* node_stat = */ 0,
 };
 
-#define X(a)   a, sizeof(a)-1
+#define X(a)  a, sizeof(a)-1
 
 /** Parameter description structure */
 static const struct params {
index 6350e24..457f1e0 100644 (file)
@@ -496,7 +496,7 @@ eval_fmt_mod_unsigned:
                        return -1;
                }
 
-               {       /* create a scope here to prevent warning about the jump to next_arg */
+               { /* create a scope here to prevent warning about the jump to next_arg */
                        type_t *const arg_type           = arg->expression->base.type;
                        type_t *const arg_skip           = skip_typeref(arg_type);
                        type_t *const expected_type_skip = skip_typeref(expected_type);
@@ -830,7 +830,7 @@ static void check_scanf_format(const call_argument_t *arg,
                        return;
                }
 
-               {       /* create a scope here to prevent warning about the jump to next_arg */
+               { /* create a scope here to prevent warning about the jump to next_arg */
                        type_t *const arg_type           = arg->expression->base.type;
                        type_t *const arg_skip           = skip_typeref(arg_type);
                        type_t *const expected_type_skip = skip_typeref(expected_type);
index c1ecb9d..795d755 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4000,7 +4000,7 @@ static entity_t *parse_declarator(const declaration_specifiers_t *specifiers,
                storage_class_t storage_class = specifiers->storage_class;
                entity->declaration.declared_storage_class = storage_class;
 
-               if (storage_class == STORAGE_CLASS_NONE && current_function != NULL)
+               if (storage_class == STORAGE_CLASS_NONE && current_function != NULL)
                        storage_class = STORAGE_CLASS_AUTO;
                entity->declaration.storage_class = storage_class;
        }
@@ -4264,7 +4264,7 @@ entity_t *record_entity(entity_t *entity, const bool is_definition)
                        } else {
                                unsigned old_storage_class = prev_decl->storage_class;
 
-                               if (warning.redundant_decls               &&
+                               if (warning.redundant_decls               &&
                                                is_definition                     &&
                                                !prev_decl->used                  &&
                                                !(prev_decl->modifiers & DM_USED) &&
@@ -7431,8 +7431,8 @@ static void check_call_argument(type_t          *expected_type,
                /* report exact scope in error messages (like "in argument 3") */
                char buf[64];
                snprintf(buf, sizeof(buf), "call argument %u", pos);
-               report_assign_error(error, expected_type, arg_expr,     buf,
-                                                       &arg_expr->base.source_position);
+               report_assign_error(error, expected_type, arg_expr, buf,
+                                   &arg_expr->base.source_position);
        } else if (warning.traditional || warning.conversion) {
                type_t *const promoted_type = get_default_promoted_type(arg_type);
                if (!types_compatible(expected_type_skip, promoted_type) &&
@@ -8083,8 +8083,8 @@ static void set_address_taken(expression_t *expression, bool may_be_register)
        if (entity->declaration.storage_class == STORAGE_CLASS_REGISTER
                        && !may_be_register) {
                errorf(&expression->base.source_position,
-                               "address of register %s '%Y' requested",
-                               get_entity_kind_name(entity->kind),     entity->base.symbol);
+                      "address of register %s '%Y' requested",
+                      get_entity_kind_name(entity->kind), entity->base.symbol);
        }
 
        if (entity->kind == ENTITY_VARIABLE) {
@@ -9083,7 +9083,7 @@ static void register_expression_parser(parse_expression_function parser,
  * @param precedence  the precedence of the operator
  */
 static void register_infix_parser(parse_expression_infix_function parser,
-               int token_type, precedence_t precedence)
+                                  int token_type, precedence_t precedence)
 {
        expression_parser_function_t *entry = &expression_parsers[token_type];
 
@@ -10035,13 +10035,13 @@ static statement_t *parse_return(void)
                        }
                } else {
                        assign_error_t error = semantic_assign(return_type, return_value);
-                       report_assign_error(error, return_type, return_value, "'return'",
-                                       pos);
+                       report_assign_error(error, return_type, return_value, "'return'",
+                                           pos);
                }
                return_value = create_implicit_cast(return_value, return_type);
                /* check for returning address of a local var */
                if (warning.other && return_value != NULL
-                               && return_value->base.kind == EXPR_UNARY_TAKE_ADDRESS) {
+                   && return_value->base.kind == EXPR_UNARY_TAKE_ADDRESS) {
                        const expression_t *expression = return_value->unary.value;
                        if (expression_is_local_variable(expression)) {
                                warningf(pos, "function returns address of local variable");
@@ -10051,10 +10051,10 @@ static statement_t *parse_return(void)
                /* ISO/IEC 14882:1998(E) ยง6.6.3:3 */
                if (c_mode & _CXX || strict_mode) {
                        errorf(pos,
-                                       "'return' without value, in function returning non-void");
+                              "'return' without value, in function returning non-void");
                } else {
                        warningf(pos,
-                                       "'return' without value, in function returning non-void");
+                                "'return' without value, in function returning non-void");
                }
        }
        statement->returns.value = return_value;
index 3f4a67b..40e2184 100644 (file)
@@ -8,16 +8,16 @@
 #ifndef __cplusplus
 
 #ifdef __INTEL_COMPILER
-#define bool   _Bool
-#define true   ((_Bool)1)
-#define false  ((_Bool)0)
+#define bool    _Bool
+#define true    ((_Bool)1)
+#define false   ((_Bool)0)
 #else
 
-#define bool   int
-#define true   1
-#define false  0
+#define bool    unsigned
+#define true    1
+#define false   0
 
 #endif
 #endif /* __cplusplus */
 
-#endif /* stdbool.h */
+#endif
index 05763d4..f1a4021 100644 (file)
@@ -43,7 +43,7 @@ static const char *get_atomic_type_string(const atomic_type_kind_t type)
        case ATOMIC_TYPE_CHAR:        return "byte";
        case ATOMIC_TYPE_SCHAR:       return "byte";
        case ATOMIC_TYPE_UCHAR:       return "unsigned byte";
-       case ATOMIC_TYPE_SHORT:       return "short";
+       case ATOMIC_TYPE_SHORT:       return "short";
        case ATOMIC_TYPE_USHORT:      return "unsigned short";
        case ATOMIC_TYPE_INT:         return "int";
        case ATOMIC_TYPE_UINT:        return "unsigned int";
index f86da8a..189425c 100644 (file)
@@ -81,7 +81,7 @@ static const char *get_atomic_type_string(const atomic_type_kind_t type)
        case ATOMIC_TYPE_CHAR:        return "byte";
        case ATOMIC_TYPE_SCHAR:       return "byte";
        case ATOMIC_TYPE_UCHAR:       return "byte";
-       case ATOMIC_TYPE_SHORT:       return "short";
+       case ATOMIC_TYPE_SHORT:       return "short";
        case ATOMIC_TYPE_USHORT:      return "short";
        case ATOMIC_TYPE_INT:         return "int";
        case ATOMIC_TYPE_UINT:        return "int";