From: Magnus Hagander Date: Fri, 21 Nov 2008 20:14:27 +0000 (+0000) Subject: Fix a few more format argument warnings. X-Git-Tag: recoveryinfrav9~307 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=3404cc9b8f0cfedcb8d7c8ca1f9b605205a5949a;p=users%2Fsimon%2Fpostgres.git Fix a few more format argument warnings. --- diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index dd20f3795a..419429bbe1 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -614,7 +614,7 @@ ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid) ereport(NOTICE, (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", constr_name, buf.data), - errdetail(funcdescr[funcnum]))); + errdetail("%s", funcdescr[funcnum]))); oldContext = MemoryContextSwitchTo(TopMemoryContext); info = (OldTriggerInfo *) palloc0(sizeof(OldTriggerInfo)); info->args = copyObject(stmt->args); @@ -630,7 +630,7 @@ ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid) ereport(NOTICE, (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", constr_name, buf.data), - errdetail(funcdescr[funcnum]))); + errdetail("%s", funcdescr[funcnum]))); } else { @@ -642,7 +642,7 @@ ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid) ereport(NOTICE, (errmsg("converting trigger group into constraint \"%s\" %s", constr_name, buf.data), - errdetail(funcdescr[funcnum]))); + errdetail("%s", funcdescr[funcnum]))); if (funcnum == 2) { /* This trigger is on the FK table */ diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index c806fbe489..c9cd452231 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -4789,7 +4789,7 @@ set_config_option(const char *name, const char *value, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid value for parameter \"%s\": \"%s\"", name, value), - hintmsg ? errhint(hintmsg) : 0)); + hintmsg ? errhint("%s", hintmsg) : 0)); return false; } if (newval < conf->min || newval > conf->max) @@ -5053,7 +5053,7 @@ set_config_option(const char *name, const char *value, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid value for parameter \"%s\": \"%s\"", name, value), - hintmsg ? errhint(hintmsg) : 0)); + hintmsg ? errhint("%s", hintmsg) : 0)); if (hintmsg) pfree(hintmsg); diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index b00fb5ae95..8328af1911 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -308,7 +308,7 @@ main(int argc, char *argv[]) case 2: appendPQExpBuffer(pgdumpopts, " --lock-wait-timeout="); - appendPQExpBuffer(pgdumpopts, optarg); + appendPQExpBuffer(pgdumpopts, "%s", optarg); break; default: diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index ae10b77688..4517d94de5 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -2076,7 +2076,7 @@ minimal_error_message(PGresult *res) appendPQExpBufferStr(msg, "(not available)"); appendPQExpBufferStr(msg, "\n"); - psql_error(msg->data); + psql_error("%s", msg->data); destroyPQExpBuffer(msg); }