From: Julian Seward Date: Tue, 23 Dec 2008 02:31:22 +0000 (+0000) Subject: Comment out unused code so as to get a warning free build. X-Git-Tag: svn/VALGRIND_3_4_0~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=522168019531cb0f9b263933368a5e4d7731760b;p=thirdparty%2Fvalgrind.git Comment out unused code so as to get a warning free build. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8868 --- diff --git a/drd/drd_semaphore.c b/drd/drd_semaphore.c index df3c8861f5..6dd6008584 100644 --- a/drd/drd_semaphore.c +++ b/drd/drd_semaphore.c @@ -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) { diff --git a/exp-ptrcheck/h_main.c b/exp-ptrcheck/h_main.c index e9abd20f83..1b0900153a 100644 --- a/exp-ptrcheck/h_main.c +++ b/exp-ptrcheck/h_main.c @@ -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