i386: fix compilation warning

Some gcc versions complain about assigning long* to uint32_t* on i386.

* syscall.c [I386] (i386_esp_ptr): Change type from uint32_t* to long*.
* linux/i386/arch_regs.h (i386_esp_ptr): Likewise.
* linux/x86_64/arch_regs.h: Do not include "i386/arch_regs.h".
(i386_esp_ptr): New prototype.
This commit is contained in:
Дмитрий Левин 2015-02-15 00:08:11 +00:00
parent e9bfff6de6
commit f97a4774d2
3 changed files with 3 additions and 4 deletions

View File

@ -1 +1 @@
extern uint32_t *const i386_esp_ptr;
extern long *const i386_esp_ptr;

View File

@ -1 +1 @@
#include "i386/arch_regs.h"
extern uint32_t *const i386_esp_ptr;

View File

@ -661,8 +661,7 @@ getrval2(struct tcb *tcp)
#if defined(I386)
static struct user_regs_struct i386_regs;
/* Cast suppresses signedness warning (.esp is long, not unsigned long) */
uint32_t *const i386_esp_ptr = (uint32_t*)&i386_regs.esp;
long *const i386_esp_ptr = &i386_regs.esp;
# define ARCH_REGS_FOR_GETREGS i386_regs
#elif defined(X86_64) || defined(X32)
/*