Fix compiler warning
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 12 Aug 2019 19:20:14 +0000 (21:20 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 12 Aug 2019 19:21:54 +0000 (21:21 +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 163dcad137f6477d9396fd0e33cda6df1920779e..43841e8eb4b70983f23092f70916055361e7e684 100644 (file)
@@ -2616,7 +2616,7 @@ parseQuery(Command *cmd, const char *raw_sql)
    p = sql;
    while ((p = strchr(p, ':')) != NULL)
    {
-       char        var[12];
+       char        var[13];
        char       *name;
        int         eaten;