2015-01-14 Joel Sherrill <joel.sherrill@oarcorp.com>

* doc/makedoc.c: Use uintptr_t to avoid int/pointer size warnings
This commit is contained in:
Jeff Johnston 2015-01-14 21:15:36 +00:00
parent 1148cf6f54
commit 4fab65dc6b
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2015-01-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* doc/makedoc.c: Use uintptr_t to avoid int/pointer size warnings
2015-01-14 Stefan Wallentowitz <stefan.wallentowitz@tum.de> 2015-01-14 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
* configure.host: Add extra system for OpenRISC baremetal * configure.host: Add extra system for OpenRISC baremetal

View File

@ -40,6 +40,7 @@ There is no
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <stdint.h>
#define DEF_SIZE 5000 #define DEF_SIZE 5000
#define STACK 50 #define STACK 50
@ -219,10 +220,10 @@ typedef void (*stinst_type)(NOARGS);
stinst_type *pc; stinst_type *pc;
stinst_type sstack[STACK]; stinst_type sstack[STACK];
stinst_type *ssp = &sstack[0]; stinst_type *ssp = &sstack[0];
int istack[STACK]; uintptr_t istack[STACK];
int *isp = &istack[0]; uintptr_t *isp = &istack[0];
typedef int *word_type; typedef uintptr_t *word_type;
@ -270,7 +271,7 @@ WORD(push_number)
{ {
isp++; isp++;
pc++; pc++;
*isp = (int)(*pc); *isp = (uintptr_t)(*pc);
pc++; pc++;
} }
@ -1338,7 +1339,7 @@ return(ret);
static void DEFUN_VOID(bang) static void DEFUN_VOID(bang)
{ {
*(int *)((isp[0])) = isp[-1]; *(uintptr_t *)((isp[0])) = isp[-1];
isp-=2; isp-=2;
pc++; pc++;
@ -1346,7 +1347,7 @@ pc++;
WORD(atsign) WORD(atsign)
{ {
isp[0] = *(int *)(isp[0]); isp[0] = *(uintptr_t *)(isp[0]);
pc++; pc++;
} }