This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix a warning from unwind-ia64.c
- From: ja2morri at csclub dot uwaterloo dot ca (James Morrison)
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 8 Apr 2005 12:37:52 -0400 (EDT)
- Subject: [patch] Fix a warning from unwind-ia64.c
Hi,
All the uses of emergency_reg_state_free are as an unsigned int. This
patch actually makes it an unsigned int and removes the warning:
/home/jim/gcc/gcc/gcc/config/ia64/unwind-ia64.c: In function 'alloc_reg_state':
/home/jim/gcc/gcc/gcc/config/ia64/unwind-ia64.c:312: warning: pointer targets in passing argument 1 of 'atomic_alloc' differ in signedness
Bootstrapped and regtested on ia64-linux-gnu, ok for mainline?
Jim
2005-04-08 James A. Morrison <phython@gcc.gnu.org>
* config/ia64/unwind-ia64.c (emergency_reg_state_free): Make an
unsigned int.
Index: config/ia64/unwind-ia64.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/ia64/unwind-ia64.c,v
retrieving revision 1.30
diff -u -p -r1.30 unwind-ia64.c
--- config/ia64/unwind-ia64.c 18 Mar 2005 15:24:27 -0000 1.30
+++ config/ia64/unwind-ia64.c 8 Apr 2005 16:34:00 -0000
@@ -285,10 +285,10 @@ atomic_free (unsigned int *mask, int bit
#define PTR_IN(X, P) ((P) >= (X) && (P) < (X) + SIZE (X))
static struct unw_reg_state emergency_reg_state[32];
-static int emergency_reg_state_free = MASK_FOR (emergency_reg_state);
+static unsigned int emergency_reg_state_free = MASK_FOR (emergency_reg_state);
static struct unw_labeled_state emergency_labeled_state[8];
-static int emergency_labeled_state_free = MASK_FOR (emergency_labeled_state);
+static unsigned int emergency_labeled_state_free = MASK_FOR (emergency_labeled_state);
#ifdef ENABLE_MALLOC_CHECKING
static int reg_state_alloced;