]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Comment out unused code so as to get a warning free build.
authorJulian Seward <jseward@acm.org>
Tue, 23 Dec 2008 02:31:22 +0000 (02:31 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 23 Dec 2008 02:31:22 +0000 (02:31 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8868

drd/drd_semaphore.c
exp-ptrcheck/h_main.c

index df3c8861f5ed95b8ecd3ad031981d76f94f7e83a..6dd600858447a425d8d2073191fd4bd3d124c378 100644 (file)
@@ -151,10 +151,10 @@ static struct semaphore_info* semaphore_get(const Addr semaphore)
 struct semaphore_info* semaphore_init(const Addr semaphore,
                                       const Word pshared, const UInt value)
 {
-  unsigned n;
+  /* unsigned n; */
   struct semaphore_info* p;
   Segment* sg;
-  const DrdThreadId drd_tid = thread_get_running_tid();
+  /* const DrdThreadId drd_tid = thread_get_running_tid(); */
 
   if (s_trace_semaphore)
   {
index e9abd20f839c1352164419153bff47200b112ec6..1b0900153a40837abaa7a7b0fd52a96601fb35e9 100644 (file)
@@ -2606,9 +2606,9 @@ Seg* nonptr_or_unknown(UWord x)
 //zz    VG_(printf)("%u =\n", bb);
 //zz }
 
-static ULong stats__tot_mem_refs  = 0;
-static ULong stats__refs_in_a_seg = 0;
-static ULong stats__refs_lost_seg = 0;
+//static ULong stats__tot_mem_refs  = 0;
+//static ULong stats__refs_in_a_seg = 0;
+//static ULong stats__refs_lost_seg = 0;
 
 typedef
    struct { ExeContext* ec; UWord count; }
@@ -2616,23 +2616,23 @@ typedef
 
 static OSet* lossage = NULL;
 
-static void inc_lossage ( ExeContext* ec ) 
-{
-   Lossage key, *res, *nyu;
-   key.ec = ec;
-   key.count = 0; /* frivolous */
-   res = VG_(OSetGen_Lookup)(lossage, &key);
-   if (res) {
-      tl_assert(res->ec == ec);
-      res->count++;
-   } else {
-      nyu = (Lossage*)VG_(OSetGen_AllocNode)(lossage, sizeof(Lossage));
-      tl_assert(nyu);
-      nyu->ec = ec;
-      nyu->count = 1;
-      VG_(OSetGen_Insert)( lossage, nyu );
-   }
-}
+//static void inc_lossage ( ExeContext* ec ) 
+//{
+//   Lossage key, *res, *nyu;
+//   key.ec = ec;
+//   key.count = 0; /* frivolous */
+//   res = VG_(OSetGen_Lookup)(lossage, &key);
+//   if (res) {
+//      tl_assert(res->ec == ec);
+//      res->count++;
+//   } else {
+//      nyu = (Lossage*)VG_(OSetGen_AllocNode)(lossage, sizeof(Lossage));
+//      tl_assert(nyu);
+//      nyu->ec = ec;
+//      nyu->count = 1;
+//      VG_(OSetGen_Insert)( lossage, nyu );
+//   }
+//}
 
 static void init_lossage ( void )
 {
@@ -2643,20 +2643,20 @@ static void init_lossage ( void )
    tl_assert(lossage);
 }
 
-static void show_lossage ( void )
-{
-   Lossage* elem;
-   VG_(OSetGen_ResetIter)( lossage );
-   while ( (elem = VG_(OSetGen_Next)(lossage)) ) {
-      if (elem->count < 10) continue;
-      //Char buf[100];
-      //(void)VG_(describe_IP)(elem->ec, buf, sizeof(buf)-1);
-      //buf[sizeof(buf)-1] = 0;
-      //VG_(printf)("  %,8lu  %s\n", elem->count, buf);
-      VG_(message)(Vg_UserMsg, "Lossage count %'lu at", elem->count);
-      VG_(pp_ExeContext)(elem->ec);
-   }
-}
+//static void show_lossage ( void )
+//{
+//   Lossage* elem;
+//   VG_(OSetGen_ResetIter)( lossage );
+//   while ( (elem = VG_(OSetGen_Next)(lossage)) ) {
+//      if (elem->count < 10) continue;
+//      //Char buf[100];
+//      //(void)VG_(describe_IP)(elem->ec, buf, sizeof(buf)-1);
+//      //buf[sizeof(buf)-1] = 0;
+//      //VG_(printf)("  %,8lu  %s\n", elem->count, buf);
+//      VG_(message)(Vg_UserMsg, "Lossage count %'lu at", elem->count);
+//      VG_(pp_ExeContext)(elem->ec);
+//   }
+//}
 
 // This function is called *a lot*; inlining it sped up Konqueror by 20%.
 static inline