Fix compiler warning
authorPeter Eisentraut
Mon, 12 Aug 2019 19:20:14 +0000 (21:20 +0200)
committerPeter Eisentraut
Mon, 12 Aug 2019 19:20:14 +0000 (21:20 +0200)
With some newer gcc versions (8 and 9) you get a -Wformat-overflow
warning here.  In PG11 and later this was already fixed.  Since it's
trivial, backport it to get the older branches building without
warnings.

src/bin/pgbench/pgbench.c

index 0c1b01ecdae08d5db52123b2ecc8b1f1d8823c71..341dc8bba9b34fe91857fa9d1a3f89f69d9cb791 100644 (file)
@@ -2857,7 +2857,7 @@ parseQuery(Command *cmd)
    p = sql;
    while ((p = strchr(p, ':')) != NULL)
    {
-       char        var[12];
+       char        var[13];
        char       *name;
        int         eaten;