Selectively disable -Warray-bounds

This commit is contained in:
Tim Angus committed 2025-07-14 17:47:18 +01:00
1 parent 2dc5fc674e
commit abc448faec
2 files changed
+24

No files matched your search

+12
View File
@@ -49,6 +49,14 @@ static vec3_t sky_clip[6] =
static float sky_mins[2][6], sky_maxs[2][6];
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
@@ -238,6 +246,10 @@ static void ClipSkyPolygon (int nump, vec3_t vecs, int stage)
ClipSkyPolygon (newc[1], newv[1][0], stage+1);
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
/*
==============
ClearSkyBox
+12
View File
@@ -49,6 +49,14 @@ static vec3_t sky_clip[6] =
static float sky_mins[2][6], sky_maxs[2][6];
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
@@ -238,6 +246,10 @@ static void ClipSkyPolygon (int nump, vec3_t vecs, int stage)
ClipSkyPolygon (newc[1], newv[1][0], stage+1);
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
/*
==============
ClearSkyBox