From: Matthew Fernandez Date: Thu, 6 Jan 2022 04:48:07 +0000 (-0800) Subject: lib/mingle: [nfc] pre-emptively squash -fpermissive warning X-Git-Tag: 3.0.0~88^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ade2f3fda596149e43ecb567c1569574500eb5c;p=graphviz lib/mingle: [nfc] pre-emptively squash -fpermissive warning When moving this code to C++ in an upcoming commit, this would otherwise trigger: lib/mingle/ink.cpp:46:22: error: uninitialized const 'Origin' [-fpermissive] static const point_t Origin; ^ In file included from lib/mingle/ink.cpp:17:0: lib/mingle/ink.h:19:16: note: 'const struct point_t' has no user-provided default constructor typedef struct { ^ lib/mingle/ink.h:20:10: note: and the implicitly-defined constructor does not initialize 'double point_t::x' double x, y; ^ This noisy initialization can probably be undone after mingle and libmingle are moved to entirely C++. Gitlab: #2154 --- diff --git a/lib/mingle/ink.c b/lib/mingle/ink.c index 78a27d714..2c7caa43d 100644 --- a/lib/mingle/ink.c +++ b/lib/mingle/ink.c @@ -43,7 +43,7 @@ static double dotPoint(point_t a, point_t b){ return a.x*b.x + a.y*b.y; } -static const point_t Origin; +static const point_t Origin = {0, 0}; /* sumLengths: */