From 8924fcd9b9a53b1fededc26b576aad6b21062306 Mon Sep 17 00:00:00 2001 From: Remko Scharroo Date: Sun, 27 Jul 2025 17:17:41 +0200 Subject: [PATCH] Avoid some warnings during compilation --- src/gmt_init.c | 2 +- src/grdinterpolate.c | 2 +- src/potential/gmtgravmag3d.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gmt_init.c b/src/gmt_init.c index 1f877e8b6d6..a6d7a576cc2 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -4986,7 +4986,7 @@ GMT_LOCAL int gmtinit_parse5_B_option (struct GMT_CTRL *GMT, char *in) { GMT->current.setting.map_frame_type = GMT_IS_PLAIN; /* A no-frame fancy would be super complicated */ GMT->current.setting.map_frame_pen.rgb[3] = 1.0; /* Since it is very hard to no plot the axis, just make it transparent. */ } - else if (text[0] == '0' && !text[1] || !strncmp(text, "00", 2)) { /* Understand format '00' to mean zero line width frame. */ + else if ((text[0] == '0' && !text[1]) || !strncmp(text, "00", 2)) { /* Understand format '00' to mean zero line width frame. */ GMT->current.map.frame.draw = true; /* But we do wish to draw the frame */ if (GMT->common.J.zactive) GMT->current.map.frame.drawz = true; /* Also brings z-axis into contention */ GMT->current.setting.map_frame_type = GMT_IS_PLAIN; /* Since checkerboard without intervals look stupid */ diff --git a/src/grdinterpolate.c b/src/grdinterpolate.c index e4968269877..351e4acc4a3 100644 --- a/src/grdinterpolate.c +++ b/src/grdinterpolate.c @@ -500,7 +500,7 @@ EXTERN_MSC int GMT_grdinterpolate (void *V_API, int mode, void *args) { } else if (Ctrl->S.active) { /* Create time/depth-series and not grid output */ /* Since we let grdtrack read the grids we do a separate branch here and the return from the module */ - uint64_t seg, row; + uint64_t seg; uint64_t dim[4] = {1, 1, 1, 2}; /* Dataset dimension for one point */ char header[GMT_LEN256] = {""}; struct GMT_DATASEGMENT *Si = NULL; diff --git a/src/potential/gmtgravmag3d.c b/src/potential/gmtgravmag3d.c index 807a2508743..840ac52ea21 100644 --- a/src/potential/gmtgravmag3d.c +++ b/src/potential/gmtgravmag3d.c @@ -511,8 +511,6 @@ GMT_LOCAL int read_xyz(struct GMT_CTRL *GMT, struct GMTGRAVMAG3D_CTRL *Ctrl, str int n_cols = 0, error; unsigned int k, n = 0; size_t n_alloc = 10 * GMT_CHUNK; - char line[GMT_LEN256] = {""}; - double x1, x2, x3; struct GMT_RECORD *In = NULL; if ((error = GMT_Set_Columns (GMT->parent, GMT_IN, 0, GMT_COL_VAR)) != GMT_NOERROR)