From faabf7d64658ae47842b4ccabdb4b68513f3cdf7 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sat, 12 Jul 2014 16:07:46 +0200 Subject: fix a bunch of compiler warnings --- src/qcommon/common.c | 2 +- src/qcommon/md5.c | 2 +- src/qcommon/unzip.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qcommon') diff --git a/src/qcommon/common.c b/src/qcommon/common.c index 761fe72..bacb01c 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -2314,7 +2314,7 @@ A way to force a bus error for development reasons ================= */ static void Com_Crash_f( void ) { - * ( int * ) 0 = 0x12345678; + * ( volatile int * ) 0 = 0x12345678; } /* diff --git a/src/qcommon/md5.c b/src/qcommon/md5.c index 5cf12bb..994083f 100644 --- a/src/qcommon/md5.c +++ b/src/qcommon/md5.c @@ -253,7 +253,7 @@ static void MD5Final(struct MD5Context *ctx, unsigned char *digest) if (digest!=NULL) memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } diff --git a/src/qcommon/unzip.c b/src/qcommon/unzip.c index b307e98..128502c 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; -- cgit