From: Dirk Mueller Date: Wed, 19 Nov 2003 22:05:35 +0000 (+0000) Subject: make it compile on non-C90 compilers. Thanks for the patch. X-Git-Tag: svn/VALGRIND_2_1_0~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1f0959dfec2d8ae3cb8fa58a350a61614d6a8b4;p=thirdparty%2Fvalgrind.git make it compile on non-C90 compilers. Thanks for the patch. CCMAIL: 68525-done@bugs.kde.org git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2051 --- diff --git a/coregrind/vg_symtab2.c b/coregrind/vg_symtab2.c index 1c45115c5a..6ead333f72 100644 --- a/coregrind/vg_symtab2.c +++ b/coregrind/vg_symtab2.c @@ -672,7 +672,9 @@ void read_symtab( SegInfo* si, Char* tab_name, Int i; Addr sym_addr; RiSym risym; - + Char* t0; + Char* name; + if (o_strtab == NULL || o_symtab == NULL) { VG_(symerr)("object doesn't have a "); VG_(symerr)(tab_name); @@ -784,10 +786,10 @@ void read_symtab( SegInfo* si, Char* tab_name, } /* If we reach here, it's an interesting symbol; record it. */ - Char* t0 = sym->st_name + t0 = sym->st_name ? (Char*)(o_strtab+sym->st_name) : (Char*)"NONAME"; - Char *name = VG_(addStr) ( si, t0, -1 ); + name = VG_(addStr) ( si, t0, -1 ); vg_assert(name != NULL /* && 0==VG_(strcmp)(t0,&vg_strtab[nmoff]) */ ); vg_assert( (Int)sym->st_value >= 0);