diff --git a/tools/qfcc/include/type.h b/tools/qfcc/include/type.h index 40c7d2389..9b880919f 100644 --- a/tools/qfcc/include/type.h +++ b/tools/qfcc/include/type.h @@ -199,7 +199,7 @@ type_t *uint_type (const type_t *base) __attribute__((pure)); */ type_t *float_type (const type_t *base) __attribute__((pure)); -type_t *array_type (type_t *aux, int size); +type_t *array_type (const type_t *aux, int size); type_t *based_array_type (type_t *aux, int base, int top); type_t *alias_type (type_t *type, type_t *alias_chain, const char *name); const type_t *unalias_type (const type_t *type) __attribute__((pure)); diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index 03d42a3ff..732389391 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -746,7 +746,7 @@ float_type (const type_t *base) } type_t * -array_type (type_t *aux, int size) +array_type (const type_t *aux, int size) { type_t _new; type_t *new = &_new; @@ -763,7 +763,7 @@ array_type (type_t *aux, int size) } new->t.array.size = size; if (aux) { - new = find_type (append_type (new, aux)); + new = find_type (append_type (new, (type_t *) aux)); } return new; }