diff options
author | Tim Angus <tim@ngus.net> | 2011-10-21 22:48:53 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 23:38:31 +0000 |
commit | 6fa292451d11608d1588f1b28569ccb2dd1cea57 (patch) | |
tree | c7e09270d36c450beb62b4b1bb8fced3a8bb4ed4 /src/qcommon | |
parent | da2d020a143ebb13d4e3cfb3a360bdb763bf9251 (diff) |
* clang support
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/common.c | 3 | ||||
-rw-r--r-- | src/qcommon/q_platform.h | 5 | ||||
-rw-r--r-- | src/qcommon/unzip.c | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c index e8834d28..be91b245 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -2325,7 +2325,10 @@ 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 } /* diff --git a/src/qcommon/q_platform.h b/src/qcommon/q_platform.h index ea74278b..cc8e5062 100644 --- a/src/qcommon/q_platform.h +++ b/src/qcommon/q_platform.h @@ -180,7 +180,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define OS_STRING "kFreeBSD" #endif +#ifdef __clang__ +#define ID_INLINE static inline +#else #define ID_INLINE inline +#endif + #define PATH_SEP '/' #if defined __i386__ diff --git a/src/qcommon/unzip.c b/src/qcommon/unzip.c index b307e98d..128502ce 100644 --- a/src/qcommon/unzip.c +++ b/src/qcommon/unzip.c @@ -1250,7 +1250,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len) return UNZ_PARAMERROR; - if ((pfile_in_zip_read_info->read_buffer == NULL)) + if (pfile_in_zip_read_info->read_buffer == NULL) return UNZ_END_OF_LIST_OF_FILE; if (len==0) return 0; |