Skip to content

Commit 7764c3a

Browse files
authored
Avoid warnings compiling seis (#8661)
1 parent 7aed048 commit 7764c3a

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/seis/gmtisf.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ static int parse(struct GMT_CTRL *GMT, struct READISF_CTRL *Ctrl, struct GMT_OPT
101101
* returned when registering these sources/destinations with the API.
102102
*/
103103

104-
unsigned int n_errors = 0, n_files = 0, pos = 0;
105-
int i, j, k;
106-
size_t n_alloc = 0, len;
107-
char txt_a[GMT_LEN256] = {""}, txt_b[GMT_LEN256] = {""}, p[GMT_BUFSIZ] = {""};
104+
unsigned int n_errors = 0, n_files = 0;
108105
char *pch = NULL;
109106
double t;
110107
struct GMT_OPTION *opt = NULL;
@@ -175,8 +172,7 @@ EXTERN_MSC int GMT_gmtisf(void *V_API, int mode, void *args) { /* High-level fun
175172
char f_type[6], f_plane[6];
176173
bool got_event = false, event_end, tensor_end, got_region = false;
177174
int error = GMT_NOERROR;
178-
int i, in, mag_c = 0, event_c, idx_min_rms, np, ns, n_out_cols;
179-
int export_aki = false, export_cmt = false, export_tensor = false;
175+
int i, mag_c = 0, event_c, idx_min_rms, np, ns, n_out_cols;
180176
int yyyy,mm,dd,hh,mi,ss,msec,strike,ndef,nsta,gap;
181177
int *years, *months, *days, *hours, *minutes;
182178
float stime,sdobs,lat,lon,depth,smaj,smin,sdepth,mindist,maxdist;
@@ -317,8 +313,9 @@ EXTERN_MSC int GMT_gmtisf(void *V_API, int mode, void *args) { /* High-level fun
317313
else if (!read_axes_head(line)) {
318314
if (fgets(line, ISF_LINE_LEN, fp) != NULL)
319315
if (!read_axes(line, &scale_factor, &t_val, &t_azim, &t_pl, &b_val, &b_azim,
320-
&b_pl, &p_val, &p_azim, &p_pl,author));
321-
tensor_end = true;
316+
&b_pl, &p_val, &p_azim, &p_pl,author))
317+
;
318+
tensor_end = true;
322319
}
323320
else if (tensor_end && !read_netmag_head(line)) {
324321
mag_c = read_mags(fp,line,magtype,&magind,&mag,&magerr,&nsta,author,origid,mag_t,mags);

src/seis/read_isf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ int read_event_data(FILE *fp, char *line, int *yyyy, int *mm, int *dd, int *hh,
1414
int *months, int *days, int *hours, int *minutes, int *idx_min_rms) {
1515

1616
int done = false, event_c = 0;
17-
float rms_min = 1e9, gap_min = 360;
17+
float gap_min = 360;
1818
*idx_min_rms = 0; /* I'm currently using GAP instead of RMS */
1919

2020
while (!done && (fgets (line, ISF_LINE_LEN, fp) != NULL)) {

0 commit comments

Comments
 (0)