Skip to content

Commit

Permalink
2015-01-14 Joel Sherrill <[email protected]>
Browse files Browse the repository at this point in the history
        * doc/makedoc.c: Use uintptr_t to avoid int/pointer size warnings
  • Loading branch information
jjohnstn committed Jan 14, 2015
1 parent 1148cf6 commit 4fab65d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions newlib/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2015-01-14 Joel Sherrill <[email protected]>

* doc/makedoc.c: Use uintptr_t to avoid int/pointer size warnings

2015-01-14 Stefan Wallentowitz <[email protected]>

* configure.host: Add extra system for OpenRISC baremetal
Expand Down
13 changes: 7 additions & 6 deletions newlib/doc/makedoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ There is no
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdint.h>

#define DEF_SIZE 5000
#define STACK 50
Expand Down Expand Up @@ -219,10 +220,10 @@ typedef void (*stinst_type)(NOARGS);
stinst_type *pc;
stinst_type sstack[STACK];
stinst_type *ssp = &sstack[0];
int istack[STACK];
int *isp = &istack[0];
uintptr_t istack[STACK];
uintptr_t *isp = &istack[0];

typedef int *word_type;
typedef uintptr_t *word_type;



Expand Down Expand Up @@ -270,7 +271,7 @@ WORD(push_number)
{
isp++;
pc++;
*isp = (int)(*pc);
*isp = (uintptr_t)(*pc);
pc++;

}
Expand Down Expand Up @@ -1338,15 +1339,15 @@ return(ret);

static void DEFUN_VOID(bang)
{
*(int *)((isp[0])) = isp[-1];
*(uintptr_t *)((isp[0])) = isp[-1];
isp-=2;
pc++;

}

WORD(atsign)
{
isp[0] = *(int *)(isp[0]);
isp[0] = *(uintptr_t *)(isp[0]);
pc++;
}

Expand Down

0 comments on commit 4fab65d

Please sign in to comment.