about summary refs log tree commit diff
path: root/ports/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-11-20 02:40:12 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-11-20 02:40:12 +0000
commitaa099ade815644694e37c44cb129d3267c297d06 (patch)
tree327c872cfa84516daa6ed02a248181243cb09387 /ports/sysdeps/unix/sysv/linux
parentbd077d205aab57df26d5b2b3f1766c52b8dd7583 (diff)
downloadglibc-aa099ade815644694e37c44cb129d3267c297d06.tar.gz
glibc-aa099ade815644694e37c44cb129d3267c297d06.tar.xz
glibc-aa099ade815644694e37c44cb129d3267c297d06.zip
Fix int-to-pointer-cast warnings for MIPS.
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux')
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c4
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h14
2 files changed, 9 insertions, 9 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c b/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c
index d8da27024b..943b404140 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c
+++ b/ports/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
 	int ret = __sigaltstack (NULL, &ss);				\
 	if (ret == 0							\
 	    && (!(ss.ss_flags & SS_ONSTACK)				\
-		|| ((unsigned sp_type) ((sp_type) ss.ss_sp		\
+		|| ((unsigned sp_type) ((sp_type) (long) ss.ss_sp	\
 					+ (sp_type) ss.ss_size		\
 					- sp_saved)			\
 		    < ss.ss_size)))					\
diff --git a/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index 9edde21683..7793e21478 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 2000.
 
@@ -23,9 +23,9 @@
 
 #define SIGCONTEXT unsigned long _code, struct sigcontext *
 #define SIGCONTEXT_EXTRA_ARGS _code,
-#define GET_PC(ctx)	((void *) ctx->sc_pc)
-#define GET_FRAME(ctx)	((void *) ctx->sc_regs[30])
-#define GET_STACK(ctx)	((void *) ctx->sc_regs[29])
+#define GET_PC(ctx)	((void *) (unsigned long) ctx->sc_pc)
+#define GET_FRAME(ctx)	((void *) (unsigned long) ctx->sc_regs[30])
+#define GET_STACK(ctx)	((void *) (unsigned long) ctx->sc_regs[29])
 #define CALL_SIGHANDLER(handler, signo, ctx) \
   (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 
@@ -33,9 +33,9 @@
 
 #define SIGCONTEXT unsigned long _code, ucontext_t *
 #define SIGCONTEXT_EXTRA_ARGS _code,
-#define GET_PC(ctx)	((void *) ctx->uc_mcontext.pc)
-#define GET_FRAME(ctx)	((void *) ctx->uc_mcontext.gregs[30])
-#define GET_STACK(ctx)	((void *) ctx->uc_mcontext.gregs[29])
+#define GET_PC(ctx)	((void *) (unsigned long) ctx->uc_mcontext.pc)
+#define GET_FRAME(ctx)	((void *) (unsigned long) ctx->uc_mcontext.gregs[30])
+#define GET_STACK(ctx)	((void *) (unsigned long) ctx->uc_mcontext.gregs[29])
 #define CALL_SIGHANDLER(handler, signo, ctx) \
   (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))