Selectively disable -Warray-bounds
This commit is contained in:
parent
2dc5fc674e
commit
abc448faec
|
|
@ -49,6 +49,14 @@ static vec3_t sky_clip[6] =
|
||||||
static float sky_mins[2][6], sky_maxs[2][6];
|
static float sky_mins[2][6], sky_maxs[2][6];
|
||||||
static float sky_min, sky_max;
|
static float sky_min, sky_max;
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
// AddSkyPolygon and ClipSkyPolygon both technically do
|
||||||
|
// unbounded access of their vecs parameter, though in
|
||||||
|
// practice the size of what they're passed makes it safe
|
||||||
|
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
AddSkyPolygon
|
AddSkyPolygon
|
||||||
|
|
@ -238,6 +246,10 @@ static void ClipSkyPolygon (int nump, vec3_t vecs, int stage)
|
||||||
ClipSkyPolygon (newc[1], newv[1][0], stage+1);
|
ClipSkyPolygon (newc[1], newv[1][0], stage+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============
|
==============
|
||||||
ClearSkyBox
|
ClearSkyBox
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,14 @@ static vec3_t sky_clip[6] =
|
||||||
static float sky_mins[2][6], sky_maxs[2][6];
|
static float sky_mins[2][6], sky_maxs[2][6];
|
||||||
static float sky_min, sky_max;
|
static float sky_min, sky_max;
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
// AddSkyPolygon and ClipSkyPolygon both technically do
|
||||||
|
// unbounded access of their vecs parameter, though in
|
||||||
|
// practice the size of what they're passed makes it safe
|
||||||
|
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
AddSkyPolygon
|
AddSkyPolygon
|
||||||
|
|
@ -238,6 +246,10 @@ static void ClipSkyPolygon (int nump, vec3_t vecs, int stage)
|
||||||
ClipSkyPolygon (newc[1], newv[1][0], stage+1);
|
ClipSkyPolygon (newc[1], newv[1][0], stage+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============
|
==============
|
||||||
ClearSkyBox
|
ClearSkyBox
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user