|
From: <sv...@va...> - 2005-07-29 18:33:34
|
Author: tom
Date: 2005-07-29 19:33:19 +0100 (Fri, 29 Jul 2005)
New Revision: 4294
Log:
A static const variable must have a constant initialiser, so remove the
static qualifier from those variables with a non-constant initialiser.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_debuginfo/stabs.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-07-29 17:20:21 UTC (rev =
4293)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-07-29 18:33:19 UTC (rev =
4294)
@@ -610,7 +610,7 @@
partial mappings at the ends are truncated. */
void VG_(unmap_range)(Addr addr, SizeT len)
{
- static const Bool debug =3D False || mem_debug;
+ const Bool debug =3D False || mem_debug;
Segment* s;
Addr end, s_end;
Int i;
@@ -727,7 +727,7 @@
UInt dev, UInt ino, ULong off,=20
const Char *filename)
{
- static const Bool debug =3D False || mem_debug;
+ const Bool debug =3D False || mem_debug;
Segment* s;
Int idx;
HChar* stage2_suffix1 =3D "lib/valgrind/stage2";
@@ -874,7 +874,7 @@
void VG_(mprotect_range)(Addr a, SizeT len, UInt prot)
{
Int r;
- static const Bool debug =3D False || mem_debug;
+ const Bool debug =3D False || mem_debug;
=20
if (debug)
VG_(printf)("\nmprotect_range(%p, %lu, %x)\n", a, len, prot);
@@ -905,7 +905,7 @@
*/
Addr VG_(find_map_space)(Addr addr, SizeT len, Bool for_client)
{
- static const Bool debug =3D False || mem_debug;
+ const Bool debug =3D False || mem_debug;
Addr ret;
Addr addrOrig =3D addr;
Addr limit =3D (for_client ? VG_(client_end)-1 : VG_(valgrind_last)=
);
Modified: trunk/coregrind/m_debuginfo/stabs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/stabs.c 2005-07-29 17:20:21 UTC (rev 4293=
)
+++ trunk/coregrind/m_debuginfo/stabs.c 2005-07-29 18:33:19 UTC (rev 4294=
)
@@ -131,7 +131,7 @@
*/
static SymType *structRef(StabTypeTab *tab, SymType *def, Bool isstruct,=
Char *name)
{
- static const Bool debug =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
struct structlist *sl;
SymType *ty;
static Int warnlen =3D 0;
@@ -176,7 +176,7 @@
/* Add a structural defintion for a struct/union reference */
static SymType *structDef(StabTypeTab *tab, SymType *def, Bool isstruct,=
Char *name)
{
- static const Bool debug =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
SymType *ref =3D structRef(tab, NULL, isstruct, name);
=20
/* it seems that GNAT likes to declare names as both struct tags
@@ -244,7 +244,7 @@
/* add a new index for a file */
static void addFileAlias(StabTypeTab *tab, Char *filename, UInt instance=
, Int idx)
{
- static const Bool debug =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
struct header *hp;
=20
for(hp =3D tab->headerhash[header_hash(filename, instance)]; hp !=3D =
NULL; hp =3D hp->next) {
@@ -263,7 +263,7 @@
=20
static void addHeader(StabTypeTab *tab, Char *filename, UInt instance, I=
nt idx)
{
- static const Bool debug =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
struct header *hp, **bucket;
=20
if (debug)
@@ -484,7 +484,7 @@
=20
static void stab_resolve(SymType *st, void *data)
{
- static const Bool debug =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
Char *str =3D (Char *)data;
vg_assert(!ML_(st_isresolved)(st));
=20
@@ -501,7 +501,7 @@
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 =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
Char *p =3D *pp;
Char t;
SymType *type;
@@ -1030,7 +1030,7 @@
/* 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 =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
Char *name =3D *namep;
Char *ty;
Int len;
@@ -1171,7 +1171,7 @@
definitions helps a lot. */
static Scope *addSymsToScope(Scope *sc, struct symlist *list, Int nsyms,=
Scope *outer)
{
- static const Bool debug =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
Int j;
struct symlist *n;
Int base;
@@ -1217,7 +1217,7 @@
UChar* stabC, Int stab_sz,=20
UChar* stabstr, Int stabstr_sz )
{
- static const Bool debug =3D False || stabs_debug;
+ const Bool debug =3D False || stabs_debug;
Int i;
Int n_stab_entries;
struct nlist* stab =3D (struct nlist*)stabC;
@@ -1295,7 +1295,7 @@
=20
/* handle continued string stabs */
{
- static const Bool contdebug =3D False || stabs_debug;
+ const Bool contdebug =3D False || stabs_debug;
Int buflen =3D 0;
Int idx =3D 0;
Char *buf =3D NULL;
|