]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Avoid two compiler warnings.
authorNicholas Nethercote <njn@valgrind.org>
Fri, 14 Oct 2005 13:48:54 +0000 (13:48 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 14 Oct 2005 13:48:54 +0000 (13:48 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4921

coregrind/m_debuginfo/symtypes.c

index b391fb9b28eb97f88a76952d75d0852a2353bb59..533de634102f88e01156ae60060df0b7e497b639 100644 (file)
@@ -760,7 +760,9 @@ Char *VG_(describe_addr)(ThreadId tid, Addr addr)
         Bool keep = False;
 
         /* Add a new variable to the list */
-        void newvar(Char *name, SymType *ty, Addr valuep, UInt size) {
+         // (the declaration avoids a compiler warning)
+  static void newvar(Char *name, SymType *ty, Addr valuep, UInt size);
+         void newvar(Char *name, SymType *ty, Addr valuep, UInt size) {
            Variable *v;
 
            /* have we been here before? */
@@ -980,7 +982,8 @@ Char *VG_(describe_addr)(ThreadId tid, Addr addr)
         Char expr[len*2];
         Char *sp = &expr[len]; /* pointer at start of string */
         Char *ep = sp;         /* pointer at end of string */
-        void genstring(Variable *v, Variable *inner) {
+  static void genstring(Variable *v, Variable *inner);  // avoid warning
+         void genstring(Variable *v, Variable *inner) {
            Variable *c = v->container;
 
            if (c != NULL)