Commit 275248a8 authored by Florian Wittkamp's avatar Florian Wittkamp

Fix: Some compiler warnings and Makefile

parent 82f12c80
......@@ -232,26 +232,26 @@ SNAPMERGE_OBJ = $(SNAPMERGE_SCR:%.c=%.o)
PARTMODEL_OBJ = $(PARTMODEL_SCR:%.c=%.o)
SEISMERGE_OBJ = $(SEISMERGE_SCR:%.c=%.o)
sofi3D: $(SOFI3D_OBJ)
$(CC) $(SOFI3D_OBJ) -o ../bin/sofi3D $(LFLAGS)
seismerge: $(SEISMERGE_OBJ)
$(CC) $(LFLAGS) $(SEISMERGE_OBJ) -o ../bin/seismerge
$(CC) $(SEISMERGE_OBJ) -o ../bin/seismerge $(LFLAGS)
snapmerge: $(SNAPMERGE_OBJ)
$(CC) $(LFLAGS) $(SNAPMERGE_OBJ) -o ../bin/snapmerge
$(CC) $(SNAPMERGE_OBJ) -o ../bin/snapmerge $(LFLAGS)
part_model: $(PARTMODEL_OBJ)
$(CC) $(LFLAGS) $(PARTMODEL_OBJ) -o ../bin/partmodel
sofi3D: $(SOFI3D_OBJ)
$(CC) $(LFLAGS) $(SOFI3D_OBJ) -o ../bin/sofi3D
$(CC) $(PARTMODEL_OBJ) -o ../bin/partmodel $(LFLAGS)
#sofi3D_rsg: $(SOFI3D_OBJ_RSG)
# $(CC) $(LFLAGS) $(SOFI3D_OBJ_RSG) -o ../bin/sofi3D_rsg
# $(CC) $(SOFI3D_OBJ_RSG) -o ../bin/sofi3D_rsg $(LFLAGS)
sofi3D_bench: $(SOFI3D_OBJ_BENCH)
$(CC) $(LFLAGS) $(SOFI3D_OBJ_BENCH) -o ../bin/sofi3D_bench
$(CC) $(SOFI3D_OBJ_BENCH) -o ../bin/sofi3D_bench $(LFLAGS)
sofi3D_acoustic: $(SOFI3D_OBJ_ACOUSTIC)
$(CC) $(LFLAGS) $(SOFI3D_OBJ_ACOUSTIC) -o ../bin/sofi3D_acoustic
$(CC) $(SOFI3D_OBJ_ACOUSTIC) -o ../bin/sofi3D_acoustic $(LFLAGS)
clean:
find . -name "*.o" -exec rm {} \;
......
......@@ -267,7 +267,7 @@ int get_int_from_objectlist(char string_in[STRING_SIZE], int number_readobject,
sprintf(errormessage,"Error in Input file, value of object %s is empty!",string_in);
err(errormessage);
}
memset(&string_buffer, '\0', sizeof(&string_buffer));
memset(&string_buffer, '\0', sizeof(string_buffer));
double_buffer = strtod(value_list[ii],&string_buffer);
//printf("From string: -%s- double %f exctracted \n",value_list[ii],double_buffer);
//printf("RemString found: -%s- with length %i \n",string_buffer,strlen(string_buffer));
......@@ -319,7 +319,7 @@ int get_float_from_objectlist(char string_in[STRING_SIZE], int number_readobject
sprintf(errormessage,"Error in Input file, value of object %s is empty!",string_in);
err(errormessage);
}
memset(&string_buffer, '\0', sizeof(&string_buffer));
memset(&string_buffer, '\0', sizeof(string_buffer));
double_dummy = strtod(value_list[ii],&string_buffer);
//printf("From string: -%s- double %f exctracted \n",value_list[ii],double_dummy);
//printf("RemString found: -%s- with length %i \n",string_buffer,strlen(string_buffer));
......@@ -359,7 +359,7 @@ int get_string_from_objectlist(char string_in[STRING_SIZE], int number_readobjec
err(errormessage);
}
else {
memset(string_buffer, '\0', sizeof(string_buffer));
memset(string_buffer, '\0', sizeof(*string_buffer));
strcpy(string_buffer,value_list[ii]);
checkifstringfound=0;
//printf("\nfunc: string %s found with value -%s- \n",string_in,string_buffer);
......@@ -396,7 +396,7 @@ void remove_blankspaces_around_string(char string_in[STRING_SIZE] ) {
//copy string content from input string (ignoring blank spaces before and afer string)
sscanf(string_in,"%s",string_dummy);
//erase string content
memset(string_in, '\0', sizeof(string_in));
memset(string_in, '\0', sizeof(*string_in));
//copy dummy information withou blank spaces in original string
strcpy(string_in,string_dummy);
......
......@@ -102,10 +102,9 @@ int main(int argc, char **argv){
int * recswitch=NULL;
float * K_x=NULL, * alpha_prime_x=NULL, * a_x=NULL, * b_x=NULL, * K_x_half=NULL, * alpha_prime_x_half=NULL, * a_x_half=NULL, * b_x_half=NULL, * K_y=NULL, * alpha_prime_y=NULL, * a_y=NULL, * b_y=NULL, * K_y_half=NULL, * alpha_prime_y_half=NULL, * a_y_half=NULL, * b_y_half=NULL, * K_z=NULL, * alpha_prime_z=NULL, * a_z=NULL, * b_z=NULL, * K_z_half=NULL, * alpha_prime_z_half=NULL, * a_z_half=NULL, * b_z_half=NULL;
float *** psi_sxx_x=NULL, *** psi_syy_y=NULL, *** psi_szz_z=NULL, *** psi_sxy_y=NULL, *** psi_sxy_x=NULL, *** psi_sxz_x=NULL, *** psi_sxz_z=NULL, *** psi_syz_y=NULL, *** psi_syz_z=NULL, *** psi_vxx=NULL, *** psi_vyy=NULL, *** psi_vzz=NULL, *** psi_vxy=NULL, *** psi_vxz=NULL, *** psi_vyx=NULL, *** psi_vyz=NULL, *** psi_vzx=NULL, *** psi_vzy=NULL, *** psi_vxxs=NULL;
float *** psi_sxx_x=NULL, *** psi_syy_y=NULL, *** psi_szz_z=NULL, *** psi_sxy_y=NULL, *** psi_sxy_x=NULL, *** psi_sxz_x=NULL, *** psi_sxz_z=NULL, *** psi_syz_y=NULL, *** psi_syz_z=NULL, *** psi_vxx=NULL, *** psi_vyy=NULL, *** psi_vzz=NULL, *** psi_vxy=NULL, *** psi_vxz=NULL, *** psi_vyx=NULL, *** psi_vyz=NULL, *** psi_vzx=NULL, *** psi_vzy=NULL;
MPI_Request *req_send, *req_rec, *sreq_send, *sreq_rec;
MPI_Status *send_statuses, *rec_statuses;
float memdyn, memmodel, memseismograms, membuffer, memcpml=0.0, memtotal;
float amon=0.0, str=0.0, dip=0.0, rake=0.0;
......@@ -314,8 +313,6 @@ int main(int argc, char **argv){
req_rec=(MPI_Request *)malloc(REQUEST_COUNT*sizeof(MPI_Request));
sreq_send=(MPI_Request *)malloc(REQUEST_COUNT*sizeof(MPI_Request));
sreq_rec=(MPI_Request *)malloc(REQUEST_COUNT*sizeof(MPI_Request));
send_statuses=(MPI_Status *)malloc(REQUEST_COUNT*sizeof(MPI_Status));
rec_statuses=(MPI_Status *)malloc(REQUEST_COUNT*sizeof(MPI_Status));
/* allocation for timing arrays used for performance analysis */
time_v_update=dvector(1,NT);
......@@ -560,7 +557,6 @@ int main(int argc, char **argv){
psi_vxx = f3tensor(1,NY,1,2*FW,1,NZ);
psi_vxxs = f3tensor(1,NY,1,2*FW,1,NZ);
psi_vyy = f3tensor(1,2*FW,1,NX,1,NZ);
psi_vzz = f3tensor(1,NY,1,NX,1,2*FW);
psi_vxy = f3tensor(1,2*FW,1,NX,1,NZ);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment