Commit 47ff0630 authored by panne's avatar panne

[project @ 2004-08-22 15:50:39 by panne]

Removed a few "use of cast expressions as lvalues is deprecated"
warnings. Note that gcc is really pedantic nowadays, so we have to go
via a temporary to avoid "cast does not match function type" warnings.
parent 950c7dc1
......@@ -2682,6 +2682,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
Elf_Word* pP = (Elf_Word*)P;
Elf_Addr A = *pP;
Elf_Addr S;
void* S_tmp;
Elf_Addr value;
IF_DEBUG(linker,belch( "Rel entry %3d is raw(%6p %6p)",
......@@ -2703,7 +2704,8 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
} else {
/* No, so look up the name in our global table. */
symbol = strtab + sym.st_name;
(void*)S = lookupSymbol( symbol );
S_tmp = lookupSymbol( symbol );
S = (Elf_Addr)S_tmp;
}
if (!S) {
belch("%s: unknown symbol `%s'", oc->fileName, symbol);
......@@ -2762,6 +2764,7 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
Elf_Addr info = rtab[j].r_info;
Elf_Addr A = rtab[j].r_addend;
Elf_Addr S;
void* S_tmp;
Elf_Addr value;
# if defined(sparc_TARGET_ARCH)
Elf_Word* pP = (Elf_Word*)P;
......@@ -2797,7 +2800,8 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
} else {
/* No, so look up the name in our global table. */
symbol = strtab + sym.st_name;
(void*)S = lookupSymbol( symbol );
S_tmp = lookupSymbol( symbol );
S = (Elf_Addr)S_tmp;
#ifdef ELF_FUNCTION_DESC
/* If a function, already a function descriptor - we would
......
/* -----------------------------------------------------------------------------
* $Id: Stable.c,v 1.28 2004/08/13 13:10:45 simonmar Exp $
* $Id: Stable.c,v 1.29 2004/08/22 15:50:42 panne Exp $
*
* (c) The GHC Team, 1998-2002
*
......@@ -164,6 +164,7 @@ StgWord
lookupStableName(StgPtr p)
{
StgWord sn;
void* sn_tmp;
if (stable_ptr_free == NULL) {
enlargeStablePtrTable();
......@@ -174,7 +175,8 @@ lookupStableName(StgPtr p)
*/
p = (StgPtr)removeIndirections((StgClosure*)p);
(void *)sn = lookupHashTable(addrToStableHash,(W_)p);
sn_tmp = lookupHashTable(addrToStableHash,(W_)p);
sn = (StgWord)sn_tmp;
if (sn != 0) {
ASSERT(stable_ptr_table[sn].addr == p);
......@@ -182,7 +184,7 @@ lookupStableName(StgPtr p)
return sn;
} else {
sn = stable_ptr_free - stable_ptr_table;
(P_)stable_ptr_free = stable_ptr_free->addr;
stable_ptr_free = (snEntry*)(stable_ptr_free->addr);
stable_ptr_table[sn].ref = 0;
stable_ptr_table[sn].addr = p;
stable_ptr_table[sn].sn_obj = NULL;
......@@ -377,7 +379,7 @@ gcStablePtrTable( void )
continue;
} else {
(StgClosure *)p->addr = isAlive((StgClosure *)p->addr);
p->addr = (StgPtr)isAlive((StgClosure *)p->addr);
IF_DEBUG(stable, fprintf(stderr,"Stable name %d still alive at %p, ref %d\n", p - stable_ptr_table, p->addr, p->ref));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment