mirror of
				https://sourceware.org/git/glibc.git
				synced 2025-11-03 20:53:13 +03:00 
			
		
		
		
	Fix int-to-pointer-cast warnings for MIPS.
This commit is contained in:
		@@ -1,5 +1,19 @@
 | 
				
			|||||||
2012-11-20  Joseph Myers  <joseph@codesourcery.com>
 | 
					2012-11-20  Joseph Myers  <joseph@codesourcery.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* sysdeps/mips/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ): Cast
 | 
				
			||||||
 | 
						_Unwind_GetCFA return to _Unwind_Ptr before casting to a pointer
 | 
				
			||||||
 | 
						type.
 | 
				
			||||||
 | 
						* sysdeps/unix/sysv/linux/mips/____longjmp_chk.c (CHECK_SP): Cast
 | 
				
			||||||
 | 
						ss_sp to long before casting to sp_type.
 | 
				
			||||||
 | 
						* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h [_MIPS_SIM ==
 | 
				
			||||||
 | 
						_ABIO32] (GET_PC): Cast to unsigned long before casting to a
 | 
				
			||||||
 | 
						pointer type.
 | 
				
			||||||
 | 
						[_MIPS_SIM == _ABIO32] (GET_FRAME): Likewise.
 | 
				
			||||||
 | 
						[_MIPS_SIM == _ABIO32] (GET_STACK): Likewise.
 | 
				
			||||||
 | 
						[_MIPS_SIM != _ABIO32] (GET_PC): Likewise.
 | 
				
			||||||
 | 
						[_MIPS_SIM != _ABIO32] (GET_FRAME): Likewise.
 | 
				
			||||||
 | 
						[_MIPS_SIM != _ABIO32] (GET_STACK): Likewise.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* sysdeps/mips/bits/atomic.h [!__GNUC_PREREQ (4, 8)]
 | 
						* sysdeps/mips/bits/atomic.h [!__GNUC_PREREQ (4, 8)]
 | 
				
			||||||
	(__arch_compare_and_exchange_xxx_8_int): Separate assignments to
 | 
						(__arch_compare_and_exchange_xxx_8_int): Separate assignments to
 | 
				
			||||||
	__prev and __cmp.  Cast __cmp to void.
 | 
						__prev and __cmp.  Cast __cmp to void.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
 | 
					/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
 | 
				
			||||||
   This file is part of the GNU C Library.
 | 
					   This file is part of the GNU C Library.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   The GNU C Library is free software; you can redistribute it and/or
 | 
					   The GNU C Library is free software; you can redistribute it and/or
 | 
				
			||||||
@@ -26,7 +26,9 @@
 | 
				
			|||||||
  ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
 | 
					  ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj)		\
 | 
					#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj)		\
 | 
				
			||||||
  _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
 | 
					  _JMPBUF_UNWINDS_ADJ (_jmpbuf,						\
 | 
				
			||||||
 | 
							       (void *) (_Unwind_Ptr) _Unwind_GetCFA (_context), \
 | 
				
			||||||
 | 
							       _adj)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline uintptr_t __attribute__ ((unused))
 | 
					static inline uintptr_t __attribute__ ((unused))
 | 
				
			||||||
_jmpbuf_sp (__jmp_buf regs)
 | 
					_jmpbuf_sp (__jmp_buf regs)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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.
 | 
					   This file is part of the GNU C Library.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   The GNU C Library is free software; you can redistribute it and/or
 | 
					   The GNU C Library is free software; you can redistribute it and/or
 | 
				
			||||||
@@ -29,7 +29,7 @@
 | 
				
			|||||||
	int ret = __sigaltstack (NULL, &ss);				\
 | 
						int ret = __sigaltstack (NULL, &ss);				\
 | 
				
			||||||
	if (ret == 0							\
 | 
						if (ret == 0							\
 | 
				
			||||||
	    && (!(ss.ss_flags & SS_ONSTACK)				\
 | 
						    && (!(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_type) ss.ss_size		\
 | 
				
			||||||
					- sp_saved)			\
 | 
										- sp_saved)			\
 | 
				
			||||||
		    < ss.ss_size)))					\
 | 
							    < ss.ss_size)))					\
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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.
 | 
					   This file is part of the GNU C Library.
 | 
				
			||||||
   Contributed by Andreas Jaeger <aj@suse.de>, 2000.
 | 
					   Contributed by Andreas Jaeger <aj@suse.de>, 2000.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -23,9 +23,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define SIGCONTEXT unsigned long _code, struct sigcontext *
 | 
					#define SIGCONTEXT unsigned long _code, struct sigcontext *
 | 
				
			||||||
#define SIGCONTEXT_EXTRA_ARGS _code,
 | 
					#define SIGCONTEXT_EXTRA_ARGS _code,
 | 
				
			||||||
#define GET_PC(ctx)	((void *) ctx->sc_pc)
 | 
					#define GET_PC(ctx)	((void *) (unsigned long) ctx->sc_pc)
 | 
				
			||||||
#define GET_FRAME(ctx)	((void *) ctx->sc_regs[30])
 | 
					#define GET_FRAME(ctx)	((void *) (unsigned long) ctx->sc_regs[30])
 | 
				
			||||||
#define GET_STACK(ctx)	((void *) ctx->sc_regs[29])
 | 
					#define GET_STACK(ctx)	((void *) (unsigned long) ctx->sc_regs[29])
 | 
				
			||||||
#define CALL_SIGHANDLER(handler, signo, ctx) \
 | 
					#define CALL_SIGHANDLER(handler, signo, ctx) \
 | 
				
			||||||
  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 | 
					  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -33,9 +33,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define SIGCONTEXT unsigned long _code, ucontext_t *
 | 
					#define SIGCONTEXT unsigned long _code, ucontext_t *
 | 
				
			||||||
#define SIGCONTEXT_EXTRA_ARGS _code,
 | 
					#define SIGCONTEXT_EXTRA_ARGS _code,
 | 
				
			||||||
#define GET_PC(ctx)	((void *) ctx->uc_mcontext.pc)
 | 
					#define GET_PC(ctx)	((void *) (unsigned long) ctx->uc_mcontext.pc)
 | 
				
			||||||
#define GET_FRAME(ctx)	((void *) ctx->uc_mcontext.gregs[30])
 | 
					#define GET_FRAME(ctx)	((void *) (unsigned long) ctx->uc_mcontext.gregs[30])
 | 
				
			||||||
#define GET_STACK(ctx)	((void *) ctx->uc_mcontext.gregs[29])
 | 
					#define GET_STACK(ctx)	((void *) (unsigned long) ctx->uc_mcontext.gregs[29])
 | 
				
			||||||
#define CALL_SIGHANDLER(handler, signo, ctx) \
 | 
					#define CALL_SIGHANDLER(handler, signo, ctx) \
 | 
				
			||||||
  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 | 
					  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user