summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/common.c5
-rw-r--r--src/qcommon/q_shared.c3
-rw-r--r--src/qcommon/q_shared.h6
3 files changed, 9 insertions, 5 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c
index be91b245..c2d5d353 100644
--- a/src/qcommon/common.c
+++ b/src/qcommon/common.c
@@ -2325,10 +2325,7 @@ A way to force a bus error for development reasons
=================
*/
static void Com_Crash_f( void ) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wnull-dereference"
- * ( int * ) 0 = 0x12345678;
-#pragma clang diagnostic pop
+ * ( volatile int * ) 0 = 0x12345678;
}
/*
diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c
index 00473dbf..68be72ab 100644
--- a/src/qcommon/q_shared.c
+++ b/src/qcommon/q_shared.c
@@ -707,11 +707,12 @@ int Q_isalpha( int c )
qboolean Q_isanumber( const char *s )
{
char *p;
+ double UNUSED_VAR d;
if( *s == '\0' )
return qfalse;
- strtod( s, &p );
+ d = strtod( s, &p );
return *p == '\0';
}
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index e007ae24..87750692 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -83,6 +83,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#endif
+#ifdef __GNUC__
+#define UNUSED_VAR __attribute__((unused))
+#else
+#define UNUSED_VAR
+#endif
+
#if (defined _MSC_VER)
#define Q_EXPORT __declspec(dllexport)
#elif (defined __SUNPRO_C)