From: Matthew Fernandez Date: Sat, 6 Jun 2020 01:01:11 +0000 (-0700) Subject: more precise definition of vec_new X-Git-Tag: 2.44.1~11^2~4^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbb6fa770a988bda0f4ff2e037c757786e514444;p=graphviz more precise definition of vec_new Unfortunately a definition/declaration with no parameters in older C is ambiguous. Explicitly saying 'void' tells the compiler this takes no arguments. This silences a -Wstrict-prototypes warning on GCC 8.3. This reapplies commit 31dbec0dbb2aa17535faf9093b15b26207497056 which was backed out due to a CI failure. --- diff --git a/lib/common/routespl.c b/lib/common/routespl.c index 4c2b29a42..d993ca008 100644 --- a/lib/common/routespl.c +++ b/lib/common/routespl.c @@ -912,7 +912,7 @@ typedef struct _tag_vec size_t _capelems; } vec; -static vec* vec_new() +static vec* vec_new(void) { vec* pvec = (vec*)malloc(sizeof(vec)); pvec->_capelems = 10;