]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
A static const variable must have a constant initialiser, so remove the
authorTom Hughes <tom@compton.nu>
Fri, 29 Jul 2005 18:33:19 +0000 (18:33 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 29 Jul 2005 18:33:19 +0000 (18:33 +0000)
static qualifier from those variables with a non-constant initialiser.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4294

coregrind/m_aspacemgr/aspacemgr.c
coregrind/m_debuginfo/stabs.c

index 0933775987d7f68ea40b853d420cef5c20b13f6e..514063d308face130aaf6ba59cbc24e52b639c4d 100644 (file)
@@ -610,7 +610,7 @@ static void dump_translations_from ( Segment* s )
    partial mappings at the ends are truncated. */
 void VG_(unmap_range)(Addr addr, SizeT len)
 {
-   static const Bool debug = False || mem_debug;
+   const Bool debug = False || mem_debug;
    Segment* s;
    Addr     end, s_end;
    Int      i;
@@ -727,7 +727,7 @@ VG_(map_file_segment)( Addr addr, SizeT len,
                        UInt dev, UInt ino, ULong off, 
                        const Char *filename)
 {
-   static const Bool debug = False || mem_debug;
+   const Bool debug = False || mem_debug;
    Segment* s;
    Int      idx;
    HChar*   stage2_suffix1 = "lib/valgrind/stage2";
@@ -874,7 +874,7 @@ void VG_(map_segment)(Addr addr, SizeT len, UInt prot, UInt flags)
 void VG_(mprotect_range)(Addr a, SizeT len, UInt prot)
 {
    Int r;
-   static const Bool debug = False || mem_debug;
+   const Bool debug = False || mem_debug;
 
    if (debug)
       VG_(printf)("\nmprotect_range(%p, %lu, %x)\n", a, len, prot);
@@ -905,7 +905,7 @@ void VG_(mprotect_range)(Addr a, SizeT len, UInt prot)
 */
 Addr VG_(find_map_space)(Addr addr, SizeT len, Bool for_client)
 {
-   static const Bool debug = False || mem_debug;
+   const Bool debug = False || mem_debug;
    Addr ret;
    Addr addrOrig = addr;
    Addr limit = (for_client ? VG_(client_end)-1   : VG_(valgrind_last));
index 2b6fd1d8ec4c7d1286f3fd9125c18c8be864546a..84ab763f2728291ef9ba499d8520cbef7926b6a3 100644 (file)
@@ -131,7 +131,7 @@ static UInt header_hash(Char *filename, UInt instance)
 */
 static SymType *structRef(StabTypeTab *tab, SymType *def, Bool isstruct, Char *name)
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    struct structlist *sl;
    SymType *ty;
    static Int warnlen = 0;
@@ -176,7 +176,7 @@ static SymType *structRef(StabTypeTab *tab, SymType *def, Bool isstruct, Char *n
 /* Add a structural defintion for a struct/union reference */
 static SymType *structDef(StabTypeTab *tab, SymType *def, Bool isstruct, Char *name)
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    SymType *ref = structRef(tab, NULL, isstruct, name);
 
    /* it seems that GNAT likes to declare names as both struct tags
@@ -244,7 +244,7 @@ static StabFile *getStabFile(StabTypeTab *tab, Int file, StabFile *set)
 /* add a new index for a file */
 static void addFileAlias(StabTypeTab *tab, Char *filename, UInt instance, Int idx)
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    struct header *hp;
 
    for(hp = tab->headerhash[header_hash(filename, instance)]; hp != NULL; hp = hp->next) {
@@ -263,7 +263,7 @@ static void addFileAlias(StabTypeTab *tab, Char *filename, UInt instance, Int id
 
 static void addHeader(StabTypeTab *tab, Char *filename, UInt instance, Int idx)
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    struct header *hp, **bucket;
    
    if (debug)
@@ -484,7 +484,7 @@ static void parse_typeref(Char **pp, Int *filep, Int *symp)
 
 static void stab_resolve(SymType *st, void *data)
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    Char *str = (Char *)data;
    vg_assert(!ML_(st_isresolved)(st));
 
@@ -501,7 +501,7 @@ static void stab_resolve(SymType *st, void *data)
    introduced anywhere, so we need to scan it all to pick them up. */
 static SymType *stabtype_parser(SegInfo *si, SymType *def, Char **pp)
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    Char *p = *pp;
    Char t;
    SymType *type;
@@ -1030,7 +1030,7 @@ static SymType *stabtype_parser(SegInfo *si, SymType *def, Char **pp)
 /* parse a symbol reference: NAME ':' DESC TYPE */
 static Bool initSym(SegInfo *si, Sym *sym, stab_types kind, Char **namep, Int val)
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    Char *name = *namep;
    Char *ty;
    Int len;
@@ -1171,7 +1171,7 @@ struct symlist {
    definitions helps a lot. */
 static Scope *addSymsToScope(Scope *sc, struct symlist *list, Int nsyms, Scope *outer)
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    Int j;
    struct symlist *n;
    Int base;
@@ -1217,7 +1217,7 @@ void ML_(read_debuginfo_stabs) ( SegInfo* si,
                                 UChar* stabC,   Int stab_sz, 
                                 UChar* stabstr, Int stabstr_sz )
 {
-   static const Bool debug = False || stabs_debug;
+   const Bool debug = False || stabs_debug;
    Int    i;
    Int    n_stab_entries;
    struct nlist* stab = (struct nlist*)stabC;
@@ -1295,7 +1295,7 @@ void ML_(read_debuginfo_stabs) ( SegInfo* si,
 
       /* handle continued string stabs */
       {
-        static const Bool contdebug = False || stabs_debug;
+        const Bool contdebug = False || stabs_debug;
         Int buflen = 0;
         Int idx = 0;
         Char *buf = NULL;