From: Matthew Fernandez Date: Sat, 25 Dec 2021 19:33:51 +0000 (-0800) Subject: mingle: cast results of 'malloc' X-Git-Tag: 3.0.0~95^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=068e5608b72cb96e441294cad70c763853b178c9;p=graphviz mingle: cast results of 'malloc' This has no effect at present. However, when moving this code to C++ in an upcoming commit, it would trigger -fpermissive problems. This change pre-emptively prevents this issue. --- diff --git a/cmd/mingle/minglemain.c b/cmd/mingle/minglemain.c index 61ac6b227..6a17d028b 100644 --- a/cmd/mingle/minglemain.c +++ b/cmd/mingle/minglemain.c @@ -300,7 +300,7 @@ genBundleColors (pedge edge, agxbuf* xb, double maxwgt) double len, t, len_total0 = 0; int dim = edge->dim; double* x = edge->x; - double* lens = MALLOC(sizeof(double)*edge->npoints); + double* lens = (double*)MALLOC(sizeof(double) * edge->npoints); for (j = 0; j < edge->npoints - 1; j++){ len = 0; @@ -438,7 +438,7 @@ bundle (Agraph_t* g, opts_t* opts) ia = A->ia; ja = A->ja; nz = A->nz; - xx = MALLOC(sizeof(double)*nz*4); + xx = (double*)MALLOC(sizeof(double) * nz * 4); nz = 0; dim = 4; for (i = 0; i < A->m; i++){