[build] Fix a pile of gcc 10 issues

gcc got stricter about array accesses, complicating progs macros, and
much better at detecting buffer overflows.
This commit is contained in:
Bill Currie 2020-12-21 02:12:51 +09:00
parent af814ff9a8
commit ab04a1915e
30 changed files with 125 additions and 107 deletions

View file

@ -92,10 +92,10 @@ PR_UglyValueString (progs_t *pr, etype_t type, pr_type_t *val, dstring_t *line)
dsprintf (line, "%d", val->integer_var);
break;
case ev_vector:
dsprintf (line, "%.9g %.9g %.9g", VectorExpand (val->vector_var));
dsprintf (line, "%.9g %.9g %.9g", VectorExpand (&val->vector_var));
break;
case ev_quat:
dsprintf (line, "%.9g %.9g %.9g %.9g", QuatExpand (val->quat_var));
dsprintf (line, "%.9g %.9g %.9g %.9g", QuatExpand (&val->quat_var));
break;
default:
dsprintf (line, "bad type %i", type);
@ -241,7 +241,7 @@ ED_ParseEpair (progs_t *pr, pr_type_t *base, pr_def_t *key, const char *s)
while (*v && *v != ' ')
v++;
*v = 0;
d->vector_var[i] = atof (w);
(&d->vector_var)[i] = atof (w);
w = v = v + 1;
}
free (string);