Summary: | CVS head doesn't compile on C90 compilers | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Tom Hughes <tom> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 2.1 CVS | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch to fix variable declarations |
Description
Tom Hughes
2003-11-18 20:56:20 UTC
Created attachment 3274 [details]
Patch to fix variable declarations
Subject: valgrind/coregrind CVS commit by mueller: make it compile on non-C90 compilers. Thanks for the patch. CCMAIL: 68525-done@bugs.kde.org M +5 -3 vg_symtab2.c 1.59 --- valgrind/coregrind/vg_symtab2.c #1.58:1.59 @@ -673,4 +673,6 @@ void read_symtab( SegInfo* si, Char* tab Addr sym_addr; RiSym risym; + Char* t0; + Char* name; if (o_strtab == NULL || o_symtab == NULL) { @@ -785,8 +787,8 @@ void read_symtab( SegInfo* si, Char* tab /* 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]) */ ); |