Skip to content

Commit a86ab59

Browse files
authored
Avoid some warnings during compilation (#8768)
1 parent 2f85e00 commit a86ab59

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/gmt_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4986,7 +4986,7 @@ GMT_LOCAL int gmtinit_parse5_B_option (struct GMT_CTRL *GMT, char *in) {
49864986
GMT->current.setting.map_frame_type = GMT_IS_PLAIN; /* A no-frame fancy would be super complicated */
49874987
GMT->current.setting.map_frame_pen.rgb[3] = 1.0; /* Since it is very hard to no plot the axis, just make it transparent. */
49884988
}
4989-
else if (text[0] == '0' && !text[1] || !strncmp(text, "00", 2)) { /* Understand format '00' to mean zero line width frame. */
4989+
else if ((text[0] == '0' && !text[1]) || !strncmp(text, "00", 2)) { /* Understand format '00' to mean zero line width frame. */
49904990
GMT->current.map.frame.draw = true; /* But we do wish to draw the frame */
49914991
if (GMT->common.J.zactive) GMT->current.map.frame.drawz = true; /* Also brings z-axis into contention */
49924992
GMT->current.setting.map_frame_type = GMT_IS_PLAIN; /* Since checkerboard without intervals look stupid */

src/grdinterpolate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ EXTERN_MSC int GMT_grdinterpolate (void *V_API, int mode, void *args) {
500500
}
501501
else if (Ctrl->S.active) { /* Create time/depth-series and not grid output */
502502
/* Since we let grdtrack read the grids we do a separate branch here and the return from the module */
503-
uint64_t seg, row;
503+
uint64_t seg;
504504
uint64_t dim[4] = {1, 1, 1, 2}; /* Dataset dimension for one point */
505505
char header[GMT_LEN256] = {""};
506506
struct GMT_DATASEGMENT *Si = NULL;

src/potential/gmtgravmag3d.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,6 @@ GMT_LOCAL int read_xyz(struct GMT_CTRL *GMT, struct GMTGRAVMAG3D_CTRL *Ctrl, str
511511
int n_cols = 0, error;
512512
unsigned int k, n = 0;
513513
size_t n_alloc = 10 * GMT_CHUNK;
514-
char line[GMT_LEN256] = {""};
515-
double x1, x2, x3;
516514
struct GMT_RECORD *In = NULL;
517515

518516
if ((error = GMT_Set_Columns (GMT->parent, GMT_IN, 0, GMT_COL_VAR)) != GMT_NOERROR)

0 commit comments

Comments
 (0)