pgpool2.git / summary / log / commit / refs

commit    6a0f1a0ee31b5c6ca017bd07af5f133bcc09c53d
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Tue Sep 17 22:36:38 2019 +0000

    Fix compiler warnings.


src/parser/outfuncs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/parser/outfuncs.c b/src/parser/outfuncs.c index 8df29cb36..bb78b5ee8 100644 --- a/src/parser/outfuncs.c +++ b/src/parser/outfuncs.c @@ -4879,7 +4879,6 @@ _outCreatedbOptList(String * str, List *options) { DefElem *e = lfirst(lc); Value *v = (Value *) e->arg; - int sconst = false; /* keyword */ if (strcmp(e->defname, "template") == 0) @@ -4887,14 +4886,12 @@ _outCreatedbOptList(String * str, List *options) else if (strcmp(e->defname, "location") == 0) { string_append_char(str, " LOCATION "); - sconst = true; } else if (strcmp(e->defname, "tablespace") == 0) string_append_char(str, " TABLESPACE "); else if (strcmp(e->defname, "encoding") == 0) { string_append_char(str, " ENCODING "); - sconst = true; } else if (strcmp(e->defname, "owner") == 0) string_append_char(str, " OWNER "); @@ -4914,7 +4911,7 @@ _outCreatedbOptList(String * str, List *options) { char buf[16]; - snprintf(buf, 16, "%d", v->val.ival); + snprintf(buf, sizeof(buf), "%d", v->val.ival); string_append_char(str, buf); } } [parent: 2e607c5ad56e]