here is the function which supposedly has the first error:
int read_trace(FILE *fp,FILE *fp1,int add,int mult,int div,int load,int store,int clock)
{
char line[25];
static char instr[7];
static int not_issue=0;
static char dest_operand[4];
static char src1_operand[4];
static char src2_operand[4];
int src1_op,src2_op,dest_op;
int i=0,j=0;
int tag;
if(not_issue==1)
goto label;
//reading the instruction in a given line.
if(fgets(line,25,fp)!=NULL)
{
//Reading and storing the type of instr ADD or MULT etc.
while(line[i] != ' ')
instr[i]=line[i++];
instr[i]='\0';
while(line[i]==' ')
i++;
j=0;
//for add, mult and div
if(strcmp(instr,"LD")!=0 && strcmp(instr,"SD")!=0)
{
//Reading the destination operand.
while(line[i] != ' ')
dest_operand[j++]=line[i++];
dest_operand[j]='\0';
while(line[i]==' ')
i++;
j=0;
//Reading the first source operand.
while(line[i] != ' ' && line[i] != EOF && line[i] != '\n')
src1_operand[j++]=line[i++];
src1_operand[j]='\0';
while(line[i]==' ')
i++;
j=0;
//Reading the second source operand.
while(line[i] != ' ' && line[i] != EOF && line[i] != '\n')
src2_operand[j++]=line[i++];
src2_operand[j]='\0';