X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=write_fluffy.c;h=dadf9432dc27386fec267c1dac3708f8791bba33;hb=643026ae19cfdb8e3c891407f155668768028325;hp=63dbe9abe9768510c47edae17bfc5d78fc873318;hpb=e97bf80ad2ba7f01d4a2b51d243d6273ae2d65a1;p=cparser diff --git a/write_fluffy.c b/write_fluffy.c index 63dbe9a..dadf943 100644 --- a/write_fluffy.c +++ b/write_fluffy.c @@ -174,7 +174,6 @@ static void write_type(const type_t *type) return; case TYPE_INVALID: panic("invalid type found"); - break; case TYPE_COMPLEX: case TYPE_IMAGINARY: default: @@ -282,7 +281,7 @@ static void write_function(const entity_t *entity) entity_t *parameter = entity->function.parameters.entities; int first = 1; for( ; parameter != NULL; parameter = parameter->base.next) { - assert(parameter->kind == ENTITY_VARIABLE); + assert(parameter->kind == ENTITY_PARAMETER); if(!first) { fprintf(out, ", "); } else { @@ -305,7 +304,7 @@ static void write_function(const entity_t *entity) } fprintf(out, ")"); - const type_t *return_type = function_type->return_type; + const type_t *return_type = skip_typeref(function_type->return_type); if(!is_type_atomic(return_type, ATOMIC_TYPE_VOID)) { fprintf(out, " : "); write_type(return_type);