[project @ 2003-08-01 14:58:47 by panne]
authorpanne <unknown>
Fri, 1 Aug 2003 14:58:48 +0000 (14:58 +0000)
committerpanne <unknown>
Fri, 1 Aug 2003 14:58:48 +0000 (14:58 +0000)
Warning police: Nuked unused variables.

ghc/utils/prof/cgprof/cgprof.c
ghc/utils/prof/cgprof/daVinci.c

index 98c8ed0..414476e 100644 (file)
@@ -1,5 +1,5 @@
 /* ------------------------------------------------------------------------
- * $Id: cgprof.c,v 1.3 2003/08/01 14:50:48 panne Exp $
+ * $Id: cgprof.c,v 1.4 2003/08/01 14:58:47 panne Exp $
  *                                                                     
  *     Copyright (C) 1995-2000 University of Oxford
  *                                                                     
@@ -64,7 +64,6 @@ void enlargeRawProfile() {
  * -------------------------------------------------------------------------- */
 
 void add_costs(object_cost *left, object_cost right) {
-  int i;
 
   left->syncs         += right.syncs;
   left->comp_max      += right.comp_max;
@@ -634,7 +633,6 @@ void FormStack2(ccs_matrix *m, cc_matrix *n, int i, char s[])
 
 void PrintStack(ccs_matrix *m, cc_matrix *n, int i)
 {
-  char    stack[MAX_PROFILE_LINE_LENGTH];
   int j = i;
   if ((*m)[j].cc != 0)
   {
@@ -775,9 +773,7 @@ void produce_HEAP_PROFILE(FILE *HEAP_PROFILE, TheHeap *th, heap_object_matrix *h
 /* void readRawProfile(FILE *fptr,int *nonodes) { */
 
 void readRawProfile(FILE *fp,int *nonodes, int MaxNoNodes) {
-  char    line[MAX_PROFILE_LINE_LENGTH];
   char    stack[MAX_PROFILE_LINE_LENGTH];
-  char    rest[MAX_PROFILE_LINE_LENGTH];
   int     i,nolines,sstepline,syncs;
   char   *ptr,*drag;
 
@@ -791,16 +787,12 @@ void readRawProfile(FILE *fp,int *nonodes, int MaxNoNodes) {
 
   /* set to zero for now. Might use these later for heap costs. */
 
-  int     *result; /* Something to do with daVinci? */
-
   /* GHC specific variables */
 
-  int a,b,c,d,x,y,z,count, next, throw;
+  int a,b,c,d,x,z,count, next;
   int newloop;
-  char *ignore;
   char e[MAX_STRING_SIZE];
   char f[MAX_STRING_SIZE];
-  char g[MAX_STRING_SIZE];
   char lline[MAX_PROFILE_LINE_LENGTH];
 
   /* identifiers generated by the XML handler */
@@ -813,7 +805,6 @@ void readRawProfile(FILE *fp,int *nonodes, int MaxNoNodes) {
   char *typeconstr=">>type_constr";
   char *ending=">>";
 
-  char *blank="blank";
   /* FILE *fp; */
 
   cc_matrix *cc_m;
index fc30b6b..8e5bc94 100644 (file)
@@ -1,5 +1,5 @@
 /* ------------------------------------------------------------------------
- * $Id: daVinci.c,v 1.2 2003/08/01 14:50:50 panne Exp $
+ * $Id: daVinci.c,v 1.3 2003/08/01 14:58:48 panne Exp $
  *                                                                     
  *     Copyright (C) 1995-2000 University of Oxford
  *                                                                     
@@ -40,7 +40,6 @@ char *lastDavinciCmd;
  * -------------------------------------------------------------------------- */
 
 void cmdDaVinci(char* format,...) {
-  static char xs[MAX_PROFILE_LINE_LENGTH];
   va_list args;
 
   va_start(args, format);
@@ -254,7 +253,7 @@ static char *printCompressNode(int node, object_cost *ptr) {
   static char res[(MAX_FUNNAME+20)*4];
   char tempstring[MAX_FUNNAME+20];
   char *padding;
-  int width=0,x;
+  int x;
   char delimiter[] = "&";
 
   if (symbol_table[node].type==CG_SSTEP) 
@@ -462,8 +461,8 @@ int percentToColour(double colour) {
 
 static void recur_graphToDaVinci(int node,Matrix *graph,Matrix *costs,char* p_zeronodes, int mode){
   object_cost *ptr;
-  int i,j,no_children=0,*children,colour,small;
-  char line[MAX_FUNNAME], *node_str;
+  int i,j,no_children=0,*children,colour;
+  char *node_str;
   char tempnode[MAX_FUNNAME];
   if (Mat(int,*graph,node,node)<0) {
     printf("r(\"%d\") ",node);
@@ -533,8 +532,8 @@ static void recur_graphToDaVinci(int node,Matrix *graph,Matrix *costs,char* p_ze
 
 static void recur_graphToDaVinci_old(int node,Matrix *graph, Matrix *costs) {
   object_cost *ptr;
-  int i,j,no_children=0,*children,colour,small;
-  char line[MAX_FUNNAME], *node_str;
+  int i,j,no_children=0,*children,colour;
+  char *node_str;
   if (Mat(int,*graph,node,node)<0) {
     fprintf(logFile,"r(\"%d\") ",node);
     printf("r(\"%d\") ",node);
@@ -609,7 +608,6 @@ static void recur_graphToDaVinci_old(int node,Matrix *graph, Matrix *costs) {
 
 void updateColours(int root, Matrix *graph, Matrix *costs) {
   int i,colour,last;
-  object_cost *ptr;
 
   printf("graph(change_attr([");
   for(last=costs->rows-1;last>=0;last--)
@@ -633,7 +631,7 @@ void updateColours(int root, Matrix *graph, Matrix *costs) {
 davinciCmd parseDaVinciCmd(char *input) {
   davinciCmd result;
   char *crp;
-  char *word,*label;
+  char *word;
   int i;
   
   result.size=1;