From e8f5c6f18a2a5c3e4ab1707dbeee172212d67c29 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Wed, 27 Feb 2013 21:19:32 +1030 Subject: [PATCH] qbsp: fix pedantic compiler warning for init using stack variable addresses Signed-off-by: Kevin Shanahan --- qbsp/solidbsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qbsp/solidbsp.c b/qbsp/solidbsp.c index b6a7c38d..c3635b1f 100644 --- a/qbsp/solidbsp.c +++ b/qbsp/solidbsp.c @@ -117,7 +117,7 @@ DivideBounds(const vec3_t mins, const vec3_t maxs, const plane_t *split, int a, b, c, i, j; vec_t dist1, dist2, mid, split_mins, split_maxs; vec3_t corner; - const vec_t *bounds[] = { mins, maxs }; + const vec_t *bounds[2]; VectorCopy(mins, front_mins); VectorCopy(mins, back_mins); @@ -130,6 +130,8 @@ DivideBounds(const vec3_t mins, const vec3_t maxs, const plane_t *split, } /* Make proper sloping cuts... */ + bounds[0] = mins; + bounds[1] = maxs; for (a = 0; a < 3; ++a) { /* Check for parallel case... no intersection */ if (fabs(split->normal[a]) < NORMAL_EPSILON)