Skip to content

Commit 5f2f4ad

Browse files
committed
cleanup
1 parent 0f5b39b commit 5f2f4ad

File tree

12 files changed

+33
-40
lines changed

12 files changed

+33
-40
lines changed

system/generic/predicates.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ REAL *e;
495495
/* */
496496
/*****************************************************************************/
497497

498-
double doublerand()
498+
double doublerand(void)
499499
{
500500
double result;
501501
double expo;
@@ -521,7 +521,7 @@ double doublerand()
521521
/* */
522522
/*****************************************************************************/
523523

524-
double narrowdoublerand()
524+
double narrowdoublerand(void)
525525
{
526526
double result;
527527
double expo;
@@ -546,7 +546,7 @@ double narrowdoublerand()
546546
/* */
547547
/*****************************************************************************/
548548

549-
double uniformdoublerand()
549+
double uniformdoublerand(void)
550550
{
551551
double result;
552552
long a, b;
@@ -564,7 +564,7 @@ double uniformdoublerand()
564564
/* */
565565
/*****************************************************************************/
566566

567-
float floatrand()
567+
float floatrand(void)
568568
{
569569
float result;
570570
float expo;
@@ -589,7 +589,7 @@ float floatrand()
589589
/* */
590590
/*****************************************************************************/
591591

592-
float narrowfloatrand()
592+
float narrowfloatrand(void)
593593
{
594594
float result;
595595
float expo;
@@ -613,7 +613,7 @@ float narrowfloatrand()
613613
/* */
614614
/*****************************************************************************/
615615

616-
float uniformfloatrand()
616+
float uniformfloatrand(void)
617617
{
618618
float result;
619619
long a;
@@ -643,7 +643,7 @@ float uniformfloatrand()
643643
/*****************************************************************************/
644644

645645

646-
void exactinit()
646+
void exactinit(void)
647647
{
648648
REAL half;
649649
REAL check, lastcheck;

system/seismic/ctoeplitz.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void ctoeplitz_solve (const sf_complex *r /* top row of the matrix */,
106106
}
107107
}
108108

109-
void ctoeplitz_close()
109+
void ctoeplitz_close(void)
110110
/*< free allocated storage >*/
111111
{
112112
free (a);

system/seismic/fft2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void sft2_init(float o1, float d1,
155155
}
156156

157157
/*------------------------------------------------------------*/
158-
void sft2_close()
158+
void sft2_close(void)
159159
/*< close shift >*/
160160
{
161161
free(shf1);

system/seismic/radon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void radon_init (int nx_in /* number of offsets */,
3737
czero = sf_cmplx(0.,0.);
3838
}
3939

40-
void radon_close ()
40+
void radon_close (void)
4141
/*< free allocated storage >*/
4242
{
4343
free (c0);

system/seismic/rweone.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void rweone_thr(
559559
}
560560
}
561561

562-
void rweone_tap_init()
562+
void rweone_tap_init(void)
563563
/*< initialize taper >*/
564564
{
565565
int itap,jtap;
@@ -632,7 +632,7 @@ void rweone_fft(
632632
}
633633

634634

635-
void rweone_mrs_init()
635+
void rweone_mrs_init(void)
636636
/*< init MRS >*/
637637
{
638638
int ig;

user/chen/wavmod.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void wavmod_shot(sf_file dat, sf_file wfl, int ns, int *ps, float **ws)
124124
sf_floatwrite(data[0], ntj*ng, dat);
125125
}
126126

127-
void wavmod_close()
127+
void wavmod_close(void)
128128
/*< release memory >*/
129129
{
130130
free(data[0]);

user/chengjb/Mtti2devectorlrsvd_double.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,12 +664,12 @@ int main(int argc, char* argv[])
664664
memset(datapznumber,0,10);
665665
memset(datasznumber,0,10);
666666

667-
sprintf(dataznumber,"dataz%d",it/1);
668-
sprintf(dataxnumber,"datax%d",it/1);
669-
sprintf(datapxnumber,"datapx%d",it/1);
670-
sprintf(datasxnumber,"datasx%d",it/1);
671-
sprintf(datapznumber,"datapz%d",it/1);
672-
sprintf(datasznumber,"datasz%d",it/1);
667+
snprintf(dataznumber,10,"dataz%d",it/1);
668+
snprintf(dataxnumber,10,"datax%d",it/1);
669+
snprintf(datapxnumber,10,"datapx%d",it/1);
670+
snprintf(datasxnumber,10,"datasx%d",it/1);
671+
snprintf(datapznumber,10,"datapz%d",it/1);
672+
snprintf(datasznumber,10,"datasz%d",it/1);
673673

674674
fp1 = fopen(dataxnumber,"wb");
675675
fp2 = fopen(dataznumber,"wb");

user/dirack/vfsacrsnh_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/*< Signal function >*/
3939
/*^*/
4040

41-
float getRandomNumberBetween0and1(){
41+
float getRandomNumberBetween0and1(void){
4242
/*< Function to get a random number between 0 and 1 >*/
4343

4444
return (float)(rand()%1000)/1000;

user/hpcss/Mrtm.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ int main(int argc, char ** argv) {
6363
int ix, iz, it; /* counters */
6464
int isrc; /* source counter */
6565
int isx; /* source location, in units of dx */
66-
int imf; /* movie frame counter */
6766
int nxz; /* number of spatial grid points */
6867
int nz; /* local storage for number of depth points */
6968
int ioff; /* array offset */
@@ -169,7 +168,7 @@ int main(int argc, char ** argv) {
169168
/* receiver wavefield initialization */
170169
fzeros(rp0,nxz);
171170
fzeros(rp1,nxz);
172-
imf = 0;
171+
/* imf = 0; */
173172

174173
/* compute receiver wavefield backward in time and image by
175174
crosscorrelation at zero time, space lag */
@@ -247,7 +246,7 @@ int main(int argc, char ** argv) {
247246
/* write receiver movie snap to file if necessary */
248247
if (NULL != ri.rmfile) {
249248
sf_floatwrite(rp1,nxz,ri.rmfile);
250-
imf++;
249+
/* imf++; */
251250
}
252251

253252
/* next t */

user/hpcss/Mwave.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,11 @@ int main(int argc, char ** argv) {
6060
float * tmp; /* used to swap p1 and p0 */
6161

6262
int ix, it; /* counters */
63-
int isrc; /* source counter */
64-
int imf; /* movie frame counter */
6563
int isx; /* source location, in units of dx */
6664
int nxz; /* number of spatial grid points */
6765
/* int nz; local number of gridpoints */
6866
int ntr; /* number of traces */
6967
int nsam; /* number of trace samples */
70-
int nsrc; /* number of shots */
7168
float rz,rx,s; /* precomputed coefficients */
7269
float vmax,vmin; /* max, min velocity values */
7370
/* float two; two */
@@ -80,7 +77,7 @@ int main(int argc, char ** argv) {
8077
getinputs(true,&wi);
8178

8279
/* compute number of shots */
83-
nsrc = (wi.isxend-wi.isxbeg)/(wi.iskip); nsrc++;
80+
/* nsrc = (wi.isxend-wi.isxbeg)/(wi.iskip); nsrc++; */
8481

8582
/* compute number of spatial grid points */
8683
nxz=wi.nx * wi.nz;
@@ -120,7 +117,7 @@ int main(int argc, char ** argv) {
120117
nz=wi.nz; */
121118

122119
/* shot loop */
123-
isrc=0;
120+
/* isrc=0; */
124121
isx=wi.isxbeg;
125122
while (isx <= wi.isxend) {
126123

@@ -130,7 +127,7 @@ int main(int argc, char ** argv) {
130127
fzeros(tr,nsam);
131128

132129
/* initialize movie frame counter */
133-
imf=0;
130+
/* imf=0; */
134131

135132
/* time loop */
136133
for (it=0;it<wi.nt;it++) {
@@ -155,7 +152,7 @@ int main(int argc, char ** argv) {
155152
/* write movie snap to file if necessary */
156153
if (NULL != wi.mfile && wi.nm && !(it%wi.nm)) {
157154
sf_floatwrite(p1,nxz,wi.mfile);
158-
imf++;
155+
/* imf++; */
159156
}
160157

161158
/* next t */
@@ -166,7 +163,7 @@ int main(int argc, char ** argv) {
166163
sf_floatwrite(tr,nsam,wi.tfile);
167164

168165
isx += wi.iskip;
169-
isrc++;
166+
/* isrc++; */
170167
}
171168

172169

0 commit comments

Comments
 (0)