Skip to content

Commit 47286d1

Browse files
committed
Merge pull request #483 from chief1983/fix/292_unused_functions
Wrap some unused functions in a diagnostic protection pragma
2 parents aaa80df + 764e177 commit 47286d1

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

code/math/fvi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define UNINITIALIZED_VALUE -1234567.8f
1919
#define WARN_DIST 1.0
2020

21-
static void accurate_square_root( float A, float B, float C, float discriminant, float *root1, float *root2 );
21+
static void accurate_square_root( float A, float B, float C, float discriminant, float *root1, float *root2 ) __UNUSED;
2222

2323
static float matrix_determinant_from_vectors(const vec3d *v1, const vec3d *v2, const vec3d *v3)
2424
{

code/math/vecmat.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ matrix vmd_identity_matrix = IDENTITY_MATRIX;
2929

3030
#define UNINITIALIZED_VALUE -12345678.9f
3131

32+
static void rotate_z ( matrix *m, float theta ) __UNUSED;
33+
3234
bool vm_vec_equal(const vec4 &self, const vec4 &other)
3335
{
3436
return fl_equal(self.a1d[0], other.a1d[0]) && fl_equal(self.a1d[1], other.a1d[1]) && fl_equal(self.a1d[2], other.a1d[2]) && fl_equal(self.a1d[3], other.a1d[3]);

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ fi
263263

264264
if test "$fs2_debug" = "yes" ; then
265265
AC_DEFINE([_DEBUG])
266-
D_CFLAGS="$D_CFLAGS -O0 -g -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-write-strings -Wshadow -funroll-loops"
266+
D_CFLAGS="$D_CFLAGS -O0 -g -Wall -Wextra -Wno-unused-parameter -Wno-write-strings -Wshadow -funroll-loops"
267267
D_LDFLAGS="$D_LDFLAGS -g"
268268

269269
if test "$fs2_fred" = "yes" ; then
@@ -274,7 +274,7 @@ if test "$fs2_debug" = "yes" ; then
274274
else
275275
AC_DEFINE([NDEBUG])
276276
D_CFLAGS="$D_CFLAGS -O2 -Wall -funroll-loops"
277-
D_CFLAGS="$D_CFLAGS -Wno-unused-function -Wno-write-strings -Wno-unused-variable"
277+
D_CFLAGS="$D_CFLAGS -Wno-write-strings -Wno-unused-variable"
278278

279279
AC_C_COMPILE_FLAGS([-Wno-unused-but-set-variable])
280280

0 commit comments

Comments
 (0)