Small fixes/improvements post-cfsi_m improvement
* Avoid printing the size of a null dedup pool
* Avoid warnings of 2 unused variables on some platforms


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14132 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c
index 8c8332e..f4d212b 100644
--- a/coregrind/m_debuginfo/debuginfo.c
+++ b/coregrind/m_debuginfo/debuginfo.c
@@ -2621,17 +2621,12 @@
                     Addr min_accessible, Addr max_accessible )
 {
    CFSI_m_CacheEnt* ce;
-   DebugInfo*    di;
-   DiCfSI_m*     cfsi_m __attribute__((unused));
 
    ce = cfsi_m_cache__find(ip);
 
    if (UNLIKELY(ce == NULL))
       return 0; /* no info.  Nothing we can do. */
 
-   di = ce->di;
-   cfsi_m = ce->cfsi_m;
-
    /* Temporary impedance-matching kludge so that this keeps working
       on x86-linux and amd64-linux. */
 #  if defined(VGA_x86) || defined(VGA_amd64)
@@ -2640,7 +2635,7 @@
      uregs.xsp = sp;
      uregs.xbp = fp;
      return compute_cfa(&uregs,
-                        min_accessible,  max_accessible, di, cfsi_m);
+                        min_accessible,  max_accessible, ce->di, ce->cfsi_m);
    }
 #elif defined(VGA_s390x)
    { D3UnwindRegs uregs;
@@ -2648,7 +2643,7 @@
      uregs.sp = sp;
      uregs.fp = fp;
      return compute_cfa(&uregs,
-                        min_accessible,  max_accessible, di, cfsi_m);
+                        min_accessible,  max_accessible, ce->di, ce->cfsi_m);
    }
 #elif defined(VGA_mips32) || defined(VGA_mips64)
    { D3UnwindRegs uregs;
@@ -2656,7 +2651,7 @@
      uregs.sp = sp;
      uregs.fp = fp;
      return compute_cfa(&uregs,
-                        min_accessible,  max_accessible, di, cfsi_m);
+                        min_accessible,  max_accessible, ce->di, ce->cfsi_m);
    }
 
 #  else
diff --git a/coregrind/m_debuginfo/storage.c b/coregrind/m_debuginfo/storage.c
index 1d32ebb..9d5f4ac 100644
--- a/coregrind/m_debuginfo/storage.c
+++ b/coregrind/m_debuginfo/storage.c
@@ -1995,7 +1995,7 @@
       get_cfsi_rd_stats (di, &n_mergeables, &n_holes);
       VG_(dmsg)("CFSI total %lu mergeables %lu holes %lu uniq cfsi_m %u\n",
                 di->cfsi_used, n_mergeables, n_holes,
-                VG_(sizeDedupPA) (di->cfsi_m_pool));
+                di->cfsi_m_pool ? VG_(sizeDedupPA) (di->cfsi_m_pool) : 0);
    }
 }