Skip to content

Commit

Permalink
Fix a few compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thilinarmtb committed Feb 21, 2023
1 parent c54380e commit 25f79c8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/con.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,8 @@ int parrsb_conn_mesh(long long *vtx, double *coord, int nelt, int ndim,
int verbose = 0;
{
const char *val = getenv("PARRSB_VERBOSE_LEVEL");
if (val != NULL) verbose= atoi(val);
if (val != NULL)
verbose = atoi(val);
}

if (c.id == 0 && verbose > 0) {
Expand Down
8 changes: 5 additions & 3 deletions src/laplacian.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ static int par_csc(scalar *v, const struct laplacian *l, scalar *u,
mat_vec_csr(v, u, L->M, L->gsh, L->buf, bfr);
return 0;
}
return 1;
#endif
return 1;
}

static int par_csr_free(struct laplacian *l) {
Expand All @@ -144,7 +144,9 @@ static int par_csr_free(struct laplacian *l) {
gs_free(L->gsh);
free(L->buf);
free(L), L = NULL;
return 0;
}
return 1;
}

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -218,8 +220,8 @@ static int gs_weighted_free(struct laplacian *l) {
free(gl->diag);
gs_free(gl->gsh);

free(l->data);
l->data = NULL;
free(l->data), l->data = NULL;
return 0;
}

//------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions src/mat.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ int compress_nbrs(struct array *eij, struct array *nbr, buffer *bfr) {
pe[k].v = -s;
i = j;
}

return 0;
}

int csr_setup(struct mat *mat, struct array *entries, int sep, buffer *buf) {
Expand Down Expand Up @@ -741,6 +743,8 @@ static int compress_mij(struct array *eij, struct array *entries, buffer *bfr) {
pe[k].v = -s;
i = j;
}

return 0;
}

struct par_mat *par_csr_setup_con(const uint nelt, const ulong *eid,
Expand Down

0 comments on commit 25f79c8

Please sign in to comment.