Do not get the break block of a switch before it is sure that a jump there is actuall...
[cparser] / wrappergen / write_fluffy.c
index 05763d4..05c4f9c 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";
@@ -173,8 +173,6 @@ static void write_type(const type_t *type)
        case TYPE_FUNCTION:
                write_function_type(&type->function);
                return;
-       case TYPE_INVALID:
-               panic("invalid type found");
        case TYPE_COMPLEX:
        case TYPE_IMAGINARY:
        default:
@@ -227,7 +225,7 @@ static void write_expression(const expression_t *expression)
        case EXPR_LITERAL_INTEGER:
                fprintf(out, "%s", expression->literal.value.begin);
                break;
-       EXPR_UNARY_CASES
+       case EXPR_UNARY_CASES:
                write_unary_expression((const unary_expression_t*) expression);
                break;
        default: