Fix a warning that got through

I forgot to compile test in optimized...
This commit is contained in:
Bill Currie 2020-02-19 02:43:27 +09:00
parent bd6dcafdc8
commit a65d6bce09

View file

@ -155,7 +155,7 @@ parse_params (type_t *type, param_t *parms)
{
param_t *p;
type_t *new;
int count;
int count = 0;
new = new_type ();
new->type = ev_func;
@ -168,7 +168,9 @@ parse_params (type_t *type, param_t *parms)
count++;
}
}
new->t.func.param_types = malloc (count * sizeof (type_t));
if (count) {
new->t.func.param_types = malloc (count * sizeof (type_t));
}
for (p = parms; p; p = p->next) {
if (!p->selector && !p->type && !p->name) {
if (p->next)