summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-10-30 03:34:43 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-10-30 03:35:31 (GMT)
commitd5d63dd379bf1f6056390d2da3fbd469ebbb0bc2 (patch)
treee494443a8b96137321e2fc502856f37be5606c13
parent0b9a2ebecd9c3a2d7fcb3c70e6dda17854dd2b3c (diff)
downloadgrv-d5d63dd379bf1f6056390d2da3fbd469ebbb0bc2.zip
grv-d5d63dd379bf1f6056390d2da3fbd469ebbb0bc2.tar.gz
grv-d5d63dd379bf1f6056390d2da3fbd469ebbb0bc2.tar.bz2
grv-d5d63dd379bf1f6056390d2da3fbd469ebbb0bc2.tar.xz
Quiet warnings, mostly by -Wno-pointer-sign
Quiet gcc warnings, mostly by telling gcc to ignore pointer sign. We really don't care. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--Makefile2
-rw-r--r--Makefile.darwinx2
-rw-r--r--Makefile.w322
-rw-r--r--random.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index cdb5c38..f31f43f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC = gcc
-CWARN = -W -Wall
+CWARN = -W -Wall -Wno-pointer-sign
REQFLAGS = -D_REENTRANT -DSDL_SUBDIR
OPTFLAGS = -O2 -g
CFLAGS = $(CWARN) $(REQFLAGS) $(OPTFLAGS) $(INCLUDE)
diff --git a/Makefile.darwinx b/Makefile.darwinx
index 459626f..f9d97b6 100644
--- a/Makefile.darwinx
+++ b/Makefile.darwinx
@@ -8,7 +8,7 @@ SDL = $(SDLROOT)/SDL.framework/Versions/Current
SDLMAIN = $(SDLROOT)/devel-lite
CC = darwinx-gcc -arch i386
-CWARN = -W -Wall
+CWARN = -W -Wall -Wno-pointer-sign
REQFLAGS = -D__unix__ -D_REENTRANT
OPTFLAGS = -O2 -g
INCLUDE = -I$(SDL)/Headers
diff --git a/Makefile.w32 b/Makefile.w32
index 33fd412..9f5db6f 100644
--- a/Makefile.w32
+++ b/Makefile.w32
@@ -9,7 +9,7 @@
#
CC = gcc
-CWARN = -W -Wall
+CWARN = -W -Wall -Wno-pointer-sign
REQFLAGS = -D_REENTRANT -DSDL_SUBDIR
OPTFLAGS = -O2 -g
CFLAGS = $(CWARN) $(REQFLAGS) $(OPTFLAGS) $(INCLUDE)
diff --git a/random.c b/random.c
index ea7de34..cbf0d56 100644
--- a/random.c
+++ b/random.c
@@ -84,7 +84,7 @@ void init_by_array(const unsigned long *init_key, unsigned long key_length)
mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
i++; j++;
if (i>=N) { mt[0] = mt[N-1]; i=1; }
- if (j>=key_length) j=0;
+ if ((unsigned long)j>=key_length) j=0;
}
for (k=N-1; k; k--) {
mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))