diff --git a/doc/rst/source/devdocs/contributing.rst b/doc/rst/source/devdocs/contributing.rst index 2cedd3708ec..07150241c9b 100644 --- a/doc/rst/source/devdocs/contributing.rst +++ b/doc/rst/source/devdocs/contributing.rst @@ -440,7 +440,7 @@ using the following steps: - Run ``dvc diff`` to check that modified files are in the correct directory. - Add the modified images to dvc using ``dvc add test/baseline//``, ``dvc add doc/scripts/images/``, or ``dvc add doc/examples/images/`` - depending on the type of test modified. RUn one dvc add command per updated PostScript plot. + depending on the type of test modified. Run one dvc add command per updated PostScript plot. - Check that the .dvc file was updated by running ``git status``. - Stage the modified .dvc files in git using ``git add test/baseline//.dvc``, ``git add doc/scripts/images/.dvc``, or ``git add doc/examples/images/.dvc``, again per updated file. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 421fa406c7e..d6808d7fdab 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -139,8 +139,9 @@ message (STATUS "Searching dependent libraries. This may take a few minutes...") find_package (NETCDF REQUIRED) include_directories (${NETCDF_INCLUDE_DIR}) -# libcurl is required since 5.4 -find_package (CURL REQUIRED) +# libcurl is required since GMT 5.4 +# At least version 7.55.0 is needed for src/gmt_remote.c +find_package (CURL 7.55.0 REQUIRED) include_directories (${CURL_INCLUDE_DIRS}) list (APPEND GMT_OPTIONAL_LIBRARIES ${CURL_LIBRARIES}) set (CURL_LIBRARY ${CURL_LIBRARIES} CACHE INTERNAL "") diff --git a/src/gmt_init.c b/src/gmt_init.c index 2e6b99530e6..61d765258c6 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -1168,9 +1168,9 @@ GMT_LOCAL void gmtinit_translate_to_short_options(struct GMTAPI_CTRL *API, struc and also note that at this point we will always be at GMT_MSG_WARNING or whatever default verbosity level the program is initialized with -- fix this later (or not)! */ #endif /* 0 */ - if (modified) { + if (modified && gmt_M_is_verbose (API->GMT, GMT_MSG_INFORMATION)) { /* Echo the converted options */ char *cmd = GMT_Create_Cmd (API, *options); - GMT_Report (API, GMT_MSG_WARNING, "Reformatted options: %s\n", cmd); + GMT_Report (API, GMT_MSG_INFORMATION, "Reformatted options: %s\n", cmd); GMT_Destroy_Cmd (API, &cmd); /* Free string */ } } diff --git a/src/gmt_remote.c b/src/gmt_remote.c index 09bede01e3c..045a910773d 100644 --- a/src/gmt_remote.c +++ b/src/gmt_remote.c @@ -648,7 +648,7 @@ GMT_LOCAL size_t gmtremote_skip_large_files (struct GMT_CTRL *GMT, char * URL, s /* Get the remote file's size and if too large we refuse to download */ CURL *curl = NULL; CURLcode res; - double filesize = 0.0; + curl_off_t filesize = 0; size_t action = 0; char curl_useragent[GMT_LEN64]; @@ -677,10 +677,10 @@ GMT_LOCAL size_t gmtremote_skip_large_files (struct GMT_CTRL *GMT, char * URL, s res = curl_easy_perform (curl); if ((res = curl_easy_perform (curl)) == CURLE_OK) { - res = curl_easy_getinfo (curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize); + res = curl_easy_getinfo (curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &filesize); if ((res == CURLE_OK) && (filesize > 0.0)) { /* Got the size */ GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Remote file %s: Size is %0.0f bytes\n", URL, filesize); - action = (filesize < (double)limit) ? 0 : (size_t)filesize; + action = ((size_t)filesize < limit) ? 0 : (size_t)filesize; } } else /* We failed */ diff --git a/src/grdedit.c b/src/grdedit.c index 052ec946535..1e2ae3624b8 100644 --- a/src/grdedit.c +++ b/src/grdedit.c @@ -595,7 +595,7 @@ EXTERN_MSC int GMT_grdedit (void *V_API, int mode, void *args) { if (Ctrl->A.active) { G->header->inc[GMT_X] = gmt_M_get_inc (GMT, G->header->wesn[XLO], G->header->wesn[XHI], G->header->n_columns, G->header->registration); G->header->inc[GMT_Y] = gmt_M_get_inc (GMT, G->header->wesn[YLO], G->header->wesn[YHI], G->header->n_rows, G->header->registration); - GMT_Report (API, GMT_MSG_INFORMATION, "Reset grid-spacing in file %s to %g/%g\n", + GMT_Report (API, GMT_MSG_INFORMATION, "Reset grid-spacing in file %s to %.14g/%.14g\n", out_file, G->header->inc[GMT_X], G->header->inc[GMT_Y]); } if (gmt_M_is_geographic (GMT, GMT_IN) && gmt_M_is_cartesian (GMT, GMT_OUT)) { /* Force a switch from geographic to Cartesian */ diff --git a/src/seis/gmtisf.c b/src/seis/gmtisf.c index 96427283c98..ab2878bb952 100644 --- a/src/seis/gmtisf.c +++ b/src/seis/gmtisf.c @@ -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; @@ -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; @@ -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); diff --git a/src/seis/read_isf.c b/src/seis/read_isf.c index e718afa6189..f8a1a45a376 100644 --- a/src/seis/read_isf.c +++ b/src/seis/read_isf.c @@ -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)) {