From: Matthew Fernandez Date: Tue, 11 Oct 2022 04:40:59 +0000 (-0700) Subject: common sizeArray: remove platform-conditional struct code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fheads%2Fsmattr%2F7274ea57-04ed-4877-918e-989acc6cae8b;p=graphviz common sizeArray: remove platform-conditional struct code 08f481fa36bbf199e0f8fbf862639d8fc4e575ab made this initialization platform dependent and its commit message does not explain why. Both statements are equivalent; the value of `Agstrictdirected` _is_ `{ 1, 1, 0, 1 }`. This change removes the Windows branch of this which was causing warnings under MinGW 12.2.0: lib/common/htmltable.c:1472:5: error: missing initializer for field 'flatlock' of 'Agdesc_t' {aka 'struct Agdesc_s'} [-Werror=missing-field-initializers] 1472 | Agdesc_t dir = { 1, 1, 0, 1 }; | ^~~~~~~~ In file included from lib/common/types.h:41, from lib/common/render.h:29, from lib/common/htmltable.c:32: lib/cgraph/cgraph.h:166:14: note: 'flatlock' declared here 166 | unsigned flatlock:1; /* if sets are flattened into lists… | ^~~~~~~~ --- diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 960801f73..f3784a9ba 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -1468,11 +1468,7 @@ static void sizeArray(htmltbl_t * tbl) { graph_t *rowg; graph_t *colg; -#ifdef _WIN32 - Agdesc_t dir = { 1, 1, 0, 1 }; -#else Agdesc_t dir = Agstrictdirected; -#endif /* Do the 1D cases by hand */ if (tbl->rc == 1 || tbl->cc == 1) {