Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid warnings compiling seis #8661

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/seis/gmtisf.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ static int parse(struct GMT_CTRL *GMT, struct READISF_CTRL *Ctrl, struct GMT_OPT
* returned when registering these sources/destinations with the API.
*/

unsigned int n_errors = 0, n_files = 0, pos = 0;
int i, j, k;
size_t n_alloc = 0, len;
char txt_a[GMT_LEN256] = {""}, txt_b[GMT_LEN256] = {""}, p[GMT_BUFSIZ] = {""};
unsigned int n_errors = 0, n_files = 0;
char *pch = NULL;
double t;
struct GMT_OPTION *opt = NULL;
Expand Down Expand Up @@ -175,8 +172,7 @@ EXTERN_MSC int GMT_gmtisf(void *V_API, int mode, void *args) { /* High-level fun
char f_type[6], f_plane[6];
bool got_event = false, event_end, tensor_end, got_region = false;
int error = GMT_NOERROR;
int i, in, mag_c = 0, event_c, idx_min_rms, np, ns, n_out_cols;
int export_aki = false, export_cmt = false, export_tensor = false;
int i, mag_c = 0, event_c, idx_min_rms, np, ns, n_out_cols;
int yyyy,mm,dd,hh,mi,ss,msec,strike,ndef,nsta,gap;
int *years, *months, *days, *hours, *minutes;
float stime,sdobs,lat,lon,depth,smaj,smin,sdepth,mindist,maxdist;
Expand Down Expand Up @@ -317,8 +313,9 @@ EXTERN_MSC int GMT_gmtisf(void *V_API, int mode, void *args) { /* High-level fun
else if (!read_axes_head(line)) {
if (fgets(line, ISF_LINE_LEN, fp) != NULL)
if (!read_axes(line, &scale_factor, &t_val, &t_azim, &t_pl, &b_val, &b_azim,
&b_pl, &p_val, &p_azim, &p_pl,author));
tensor_end = true;
&b_pl, &p_val, &p_azim, &p_pl,author))
;
tensor_end = true;
}
else if (tensor_end && !read_netmag_head(line)) {
mag_c = read_mags(fp,line,magtype,&magind,&mag,&magerr,&nsta,author,origid,mag_t,mags);
Expand Down
2 changes: 1 addition & 1 deletion src/seis/read_isf.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int read_event_data(FILE *fp, char *line, int *yyyy, int *mm, int *dd, int *hh,
int *months, int *days, int *hours, int *minutes, int *idx_min_rms) {

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

while (!done && (fgets (line, ISF_LINE_LEN, fp) != NULL)) {
Expand Down
Loading