From 146afae9d96d80d64034288429914aa9f3377ce5 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Wed, 18 Sep 2019 08:07:27 +0900 Subject: [PATCH] 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 72c13ffa1..44b51e61e 100644 --- a/src/parser/outfuncs.c +++ b/src/parser/outfuncs.c @@ -4488,7 +4488,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) @@ -4496,14 +4495,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 "); @@ -4522,7 +4519,7 @@ _outCreatedbOptList(String *str, List *options) else { char buf[16]; - snprintf(buf, 16, "%ld", v->val.ival); + snprintf(buf, sizeof(buf), "%ld", v->val.ival); string_append_char(str, buf); } } -- 2.39.5