Bug 68525 - CVS head doesn't compile on C90 compilers
Summary: CVS head doesn't compile on C90 compilers
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 2.1 CVS
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-18 20:56 UTC by Tom Hughes
Modified: 2003-11-19 23:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix variable declarations (1.06 KB, patch)
2003-11-18 20:58 UTC, Tom Hughes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hughes 2003-11-18 20:56:20 UTC
The CVS head currently won't compile with a C90 compiler due to a couple of
variables in coregrind/vg_symtab2.c which are declared in the middle of a block.
Comment 1 Tom Hughes 2003-11-18 20:58:14 UTC
Created attachment 3274 [details]
Patch to fix variable declarations
Comment 2 Dirk Mueller 2003-11-19 23:07:16 UTC
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]) */ );