Callgrind: fix a few 'unused parameter' warnings

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9251 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/callgrind/bbcc.c b/callgrind/bbcc.c
index 554c1ed..2038f44 100644
--- a/callgrind/bbcc.c
+++ b/callgrind/bbcc.c
@@ -183,7 +183,7 @@
 	    bbcc, bbcc ? bbcc->tid : 0);
 
    CLG_DEBUGIF(2)
-     if (bbcc) CLG_(print_bbcc)(-2,bbcc,False);
+     if (bbcc) CLG_(print_bbcc)(-2,bbcc);
 
    return bbcc;
 }
@@ -411,7 +411,7 @@
 
 
     CLG_DEBUGIF(3)
-      CLG_(print_bbcc)(-2, new, False);
+      CLG_(print_bbcc)(-2, new);
 
     CLG_DEBUG(2,"- clone_BBCC(%p, %d) for BB %#lx\n"
 		"   orig %s\n"
@@ -453,7 +453,7 @@
      bb->last_bbcc = bbcc;
 
      CLG_DEBUGIF(3)
-       CLG_(print_bbcc)(-2, bbcc, False);
+       CLG_(print_bbcc)(-2, bbcc);
    }
 
    CLG_DEBUG(3, "- get_bbcc(BB %#lx): BBCC %p\n",
diff --git a/callgrind/callstack.c b/callgrind/callstack.c
index d89b53e..5686691 100644
--- a/callgrind/callstack.c
+++ b/callgrind/callstack.c
@@ -114,7 +114,7 @@
 
 
 /* Called when function entered nonrecursive */
-static void function_entered(fn_node* fn, BBCC* to)
+static void function_entered(fn_node* fn)
 {
   CLG_ASSERT(fn != 0);
 
@@ -147,7 +147,7 @@
 }	
 
 /* Called when function left (no recursive level active) */
-static void function_left(fn_node* fn, BBCC* from)
+static void function_left(fn_node* fn)
 {
   CLG_ASSERT(fn != 0);
 
@@ -230,7 +230,7 @@
 	jcc->call_counter++;
 	CLG_(stat).call_counter++;
 
-	if (*pdepth == 1) function_entered(to_fn, to);
+	if (*pdepth == 1) function_entered(to_fn);
     }
 
     /* return address is only is useful with a real call;
@@ -354,7 +354,7 @@
 	  CLG_(current_fn_stack).bottom + lower_entry->fn_sp;
 	CLG_ASSERT(CLG_(current_state).cxt != 0);
 
-	if (depth == 0) function_left(to_fn, jcc->from);
+	if (depth == 0) function_left(to_fn);
     }
 
     /* To allow for an assertion in push_call_stack() */
diff --git a/callgrind/debug.c b/callgrind/debug.c
index 9a49081..f9f5331 100644
--- a/callgrind/debug.c
+++ b/callgrind/debug.c
@@ -112,7 +112,7 @@
 }
 
 
-void CLG_(print_bbcc)(int s, BBCC* bbcc, Bool jumpaddr)
+void CLG_(print_bbcc)(int s, BBCC* bbcc)
 {
   BB* bb;
 
@@ -129,16 +129,9 @@
   bb = bbcc->bb;
   CLG_ASSERT(bb!=0);
 
-#if 0 
-  if (jumpaddr)
-    VG_(printf)("%s +%p=%p, ",
+  VG_(printf)("%s +%#lx=%#lx, ",
 	      bb->obj->name + bb->obj->last_slash_pos,
-	      bb->jmp_offset, bb_jmpaddr(bb));
-  else
-#endif
-    VG_(printf)("%s +%#lx=%#lx, ",
-		bb->obj->name + bb->obj->last_slash_pos,
-		bb->offset, bb_addr(bb));
+	      bb->offset, bb_addr(bb));
   CLG_(print_cxt)(s+8, bbcc->cxt, bbcc->rec_index);
 }
 
@@ -243,10 +236,10 @@
 	return;
     }
     VG_(printf)("JCC %p from ", jcc);
-    CLG_(print_bbcc)(s+9, jcc->from, True);
+    CLG_(print_bbcc)(s+9, jcc->from);
     print_indent(s+4);    
     VG_(printf)("to   ");
-    CLG_(print_bbcc)(s+9, jcc->to, False);
+    CLG_(print_bbcc)(s+9, jcc->to);
     print_indent(s+4);
     VG_(printf)("Calls %llu\n", jcc->call_counter);
     print_indent(s+4);
@@ -334,7 +327,7 @@
   bb = bbcc->bb;
   CLG_ASSERT(bb!=0);
     
-  CLG_(print_bbcc)(s, bbcc, False);
+  CLG_(print_bbcc)(s, bbcc);
 
   ecounter = bbcc->ecounter_sum;
 
@@ -440,7 +433,7 @@
 void CLG_(print_bbno)(void) {}
 void CLG_(print_context)(void) {}
 void CLG_(print_jcc)(int s, jCC* jcc) {}
-void CLG_(print_bbcc)(int s, BBCC* bbcc, Bool b) {}
+void CLG_(print_bbcc)(int s, BBCC* bbcc) {}
 void CLG_(print_bbcc_fn)(BBCC* bbcc) {}
 void CLG_(print_cost)(int s, EventSet* es, ULong* cost) {}
 void CLG_(print_bb)(int s, BB* bb) {}
diff --git a/callgrind/dump.c b/callgrind/dump.c
index 44fb276..2725701 100644
--- a/callgrind/dump.c
+++ b/callgrind/dump.c
@@ -787,7 +787,7 @@
   CLG_ASSERT(bbcc->cxt != 0);
   CLG_DEBUGIF(1) {
     VG_(printf)("+ fprint_bbcc (Instr %d): ", bb->instr_count);
-    CLG_(print_bbcc)(15, bbcc, False);
+    CLG_(print_bbcc)(15, bbcc);
   }
 
   CLG_ASSERT(currSum == 0 || currSum == 1);
@@ -1473,7 +1473,7 @@
 }
 
 
-static void close_dumpfile(Char buf[BUF_LEN], int fd, int tid)
+static void close_dumpfile(int fd)
 {
     if (fd <0) return;
 
@@ -1575,7 +1575,7 @@
     p++;
   }
 
-  close_dumpfile(print_buf, print_fd, CLG_(current_tid));
+  close_dumpfile(print_fd);
   if (array) VG_(free)(array);
   
   /* set counters of last dump */
diff --git a/callgrind/global.h b/callgrind/global.h
index 926e858..461218a 100644
--- a/callgrind/global.h
+++ b/callgrind/global.h
@@ -855,7 +855,7 @@
 void CLG_(print_bbno)(void);
 void CLG_(print_context)(void);
 void CLG_(print_jcc)(int s, jCC* jcc);
-void CLG_(print_bbcc)(int s, BBCC* bbcc, Bool);
+void CLG_(print_bbcc)(int s, BBCC* bbcc);
 void CLG_(print_bbcc_fn)(BBCC* bbcc);
 void CLG_(print_execstate)(int s, exec_state* es);
 void CLG_(print_eventset)(int s, EventSet* es);
diff --git a/callgrind/main.c b/callgrind/main.c
index a6d2075..ed58a49 100644
--- a/callgrind/main.c
+++ b/callgrind/main.c
@@ -389,10 +389,10 @@
 }
 
 static
-void collectStatementInfo(IRTypeEnv* tyenv, IRSB* bbOut, IRStmt* st,
+void collectStatementInfo(IRTypeEnv* tyenv, IRStmt* st,
 			  Addr* instrAddr, UInt* instrLen,
 			  IRExpr** loadAddrExpr, IRExpr** storeAddrExpr,
-			  UInt* dataSize, IRType hWordTy)
+			  UInt* dataSize)
 {
    CLG_ASSERT(isFlatIRStmt(st));
 
@@ -602,8 +602,8 @@
 	  i++;
 	  stnext = ( i < bbIn->stmts_used ? bbIn->stmts[i] : NULL );
 	  beforeIBoundary = !stnext || (Ist_IMark == stnext->tag);
-	  collectStatementInfo(bbIn->tyenv, bbOut, st, &instrAddr, &instrLen,
-			       &loadAddrExpr, &storeAddrExpr, &dataSize, hWordTy);
+	  collectStatementInfo(bbIn->tyenv, st, &instrAddr, &instrLen,
+			       &loadAddrExpr, &storeAddrExpr, &dataSize);
 
 	  // instrument a simulator call before conditional jumps
 	  if (st->tag == Ist_Exit) {
diff --git a/callgrind/sim.c b/callgrind/sim.c
index 6e9de48..5208a72 100644
--- a/callgrind/sim.c
+++ b/callgrind/sim.c
@@ -491,7 +491,7 @@
  * One stream can be detected per 4k page.
  */
 static __inline__
-void prefetch_L2_doref(Addr a, UChar size)
+void prefetch_L2_doref(Addr a)
 {
   UInt stream = (a >> PF_PAGEBITS) % PF_STREAMS;
   UInt block = ( a >> L2.line_size_bits);
@@ -531,7 +531,7 @@
 CacheModelResult prefetch_I1_ref(Addr a, UChar size)
 {
     if ( cachesim_ref( &I1, a, size) == Hit ) return L1_Hit;
-    prefetch_L2_doref(a,size);
+    prefetch_L2_doref(a);
     if ( cachesim_ref( &L2, a, size) == Hit ) return L2_Hit;
     return MemAccess;
 }
@@ -540,7 +540,7 @@
 CacheModelResult prefetch_D1_ref(Addr a, UChar size)
 {
     if ( cachesim_ref( &D1, a, size) == Hit ) return L1_Hit;
-    prefetch_L2_doref(a,size);
+    prefetch_L2_doref(a);
     if ( cachesim_ref( &L2, a, size) == Hit ) return L2_Hit;
     return MemAccess;
 }
@@ -552,7 +552,7 @@
 CacheModelResult prefetch_I1_Read(Addr a, UChar size)
 {
     if ( cachesim_ref( &I1, a, size) == Hit ) return L1_Hit;
-    prefetch_L2_doref(a,size);
+    prefetch_L2_doref(a);
     switch( cachesim_ref_wb( &L2, Read, a, size) ) {
 	case Hit: return L2_Hit;
 	case Miss: return MemAccess;
@@ -565,7 +565,7 @@
 CacheModelResult prefetch_D1_Read(Addr a, UChar size)
 {
     if ( cachesim_ref( &D1, a, size) == Hit ) return L1_Hit;
-    prefetch_L2_doref(a,size);
+    prefetch_L2_doref(a);
     switch( cachesim_ref_wb( &L2, Read, a, size) ) {
 	case Hit: return L2_Hit;
 	case Miss: return MemAccess;
@@ -577,7 +577,7 @@
 static
 CacheModelResult prefetch_D1_Write(Addr a, UChar size)
 {
-    prefetch_L2_doref(a,size);
+    prefetch_L2_doref(a);
     if ( cachesim_ref( &D1, a, size) == Hit ) {
 	/* Even for a L1 hit, the write-trough L1 passes
 	 * the write to the L2 to make the L2 line dirty.
diff --git a/callgrind/threads.c b/callgrind/threads.c
index 779fe41..02f3a78 100644
--- a/callgrind/threads.c
+++ b/callgrind/threads.c
@@ -422,7 +422,7 @@
   CLG_DEBUGIF(1) {
     CLG_DEBUG(1, "  cxtinfo_save(sig %d): collect %s, jmps_passed %d\n",
 	     es->sig, es->collect ? "Yes": "No", es->jmps_passed);	
-    CLG_(print_bbcc)(-9, es->bbcc, False);
+    CLG_(print_bbcc)(-9, es->bbcc);
     CLG_(print_cost)(-9, CLG_(sets).full, es->cost);
   }
 
@@ -448,7 +448,7 @@
   CLG_DEBUGIF(1) {
 	CLG_DEBUG(1, "  exec_state_restore(sig %d): collect %s, jmps_passed %d\n",
 		  es->sig, es->collect ? "Yes": "No", es->jmps_passed);
-	CLG_(print_bbcc)(-9, es->bbcc, False);
+	CLG_(print_bbcc)(-9, es->bbcc);
 	CLG_(print_cxt)(-9, es->cxt, 0);
 	CLG_(print_cost)(-9, CLG_(sets).full, es->cost);
   }