aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-03-03 16:18:24 +0300
committerseyko <seyko2@gmail.com>2015-03-03 16:18:24 +0300
commit4c8ffb353d89df3e9601c2a211092590ef5884be (patch)
treef2b2c56813f6b5d4c7e750c76b54d231c65510cb
parent20074d88629cc4947d5d51cb9d2fca5ec7068daa (diff)
downloadtinycc-4c8ffb353d89df3e9601c2a211092590ef5884be.tar.gz
tinycc-4c8ffb353d89df3e9601c2a211092590ef5884be.tar.bz2
remove a gcc warning for bcheck on x86_64 arch: conversion to pointer from integer of different size
-rw-r--r--lib/bcheck.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bcheck.c b/lib/bcheck.c
index 8ac7d4e..e5e1042 100644
--- a/lib/bcheck.c
+++ b/lib/bcheck.c
@@ -348,7 +348,9 @@ void __bound_init(void)
int i;
BoundEntry *page;
unsigned long start, size;
- int *p;
+
+ /* int *p; */
+ __PTRDIFF_TYPE__ *p; /* 32 or 64 bit integer */
/* save malloc hooks and install bound check hooks */
install_malloc_hooks();
@@ -411,7 +413,7 @@ void __bound_init(void)
#endif
/* add all static bound check values */
- p = (int *)&__bounds_start;
+ p = (__PTRDIFF_TYPE__ *)&__bounds_start;
while (p[0] != 0) {
__bound_new_region((void *)p[0], p[1]);
p += 2;