]> granicus.if.org Git - graphviz/commitdiff
more precise definition of vec_new
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 6 Jun 2020 01:01:11 +0000 (18:01 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 13 Jun 2020 17:56:28 +0000 (10:56 -0700)
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.

lib/common/routespl.c

index 4c2b29a4253ae6077f11ac2cbb8f72c52b4434a5..d993ca008decff77369a6effb367564eb18db921 100644 (file)
@@ -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;