From b24bf40b5320c210979d586c363b8d3b03e463db Mon Sep 17 00:00:00 2001 From: Tomas Zigo <50632337+tmszi@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:52:32 +0200 Subject: [PATCH] v.kriging: fix compilation warnings (#934) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * v.kriging: fix compilation warnings - passing argument 3 of ‘submatrix’ from incompatible pointer type - expected ‘struct write *’ but argument is of type ‘struct write ** - initialization of ‘double *’ from incompatible pointer type ‘int * - initialization of ‘struct write *’ from incompatible pointer type ‘struct write ** * Fix Clang format error --------- Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com> --- src/vector/v.kriging/utils_kriging.c | 8 ++++---- src/vector/v.kriging/utils_raster.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vector/v.kriging/utils_kriging.c b/src/vector/v.kriging/utils_kriging.c index 4e67d9562e..5b7df3a249 100644 --- a/src/vector/v.kriging/utils_kriging.c +++ b/src/vector/v.kriging/utils_kriging.c @@ -713,7 +713,7 @@ void crossvalidation(struct int_par *xD, struct points *pnts, correct_indices(direction, list, r, pnts, var_par); GM_sub = submatrix(list, GM, - &xD->report); // create submatrix using indices + xD->report); // create submatrix using indices GM_Inv = G_matrix_inverse(GM_sub); // inverse matrix G_matrix_free(GM_sub); @@ -834,8 +834,8 @@ int compare_NN(struct ilist *list, struct ilist *list_new, int modified) { // local variables int n = list->n_values, n_new = list_new->n_values; - double *list_value = list->value; - double *list_new_value = list_new->value; + int *list_value = list->value; + int *list_new_value = list_new->value; int i, next = 0; // the samples are different @@ -859,7 +859,7 @@ void make_subsamples(struct int_par *xD, struct ilist *list, double *r0, // Local variables int i3 = xD->i3; double *vals = pnts->invals; - struct write *report = &xD->report; + struct write *report = xD->report; int direction; mat_struct *GM_sub; diff --git a/src/vector/v.kriging/utils_raster.c b/src/vector/v.kriging/utils_raster.c index 697cd6e844..4249a569d2 100644 --- a/src/vector/v.kriging/utils_raster.c +++ b/src/vector/v.kriging/utils_raster.c @@ -3,7 +3,7 @@ /* open raster layer */ void open_layer(struct int_par *xD, struct reg_par *reg, struct output *out) { - struct write *report = &xD->report; + struct write *report = xD->report; /* 2D Raster layer */ if (xD->i3 == FALSE) { @@ -34,7 +34,7 @@ void write2layer(struct int_par *xD, struct reg_par *reg, struct output *out, // Local variables int i3 = xD->i3; int ndeps = reg->ndeps, nrows = reg->nrows, ncols = reg->ncols; - struct write *report = &xD->report; + struct write *report = xD->report; int col, row, dep; int pass = 0; /* Number of processed cells */