Attached are patches to fix the following compiler warnings that I see when using gcc 4.3.2.
MASTER warning: tablecmds.c: In function 'DropErrorMsgWrongType': tablecmds.c:601: warning: format not a string literal and no format arguments REL8_3_STABLE warnings: utility.c: In function 'DropErrorMsgWrongType': utility.c:129: warning: format not a string literal and no format arguments trigger.c: In function 'ConvertTriggerToFK': trigger.c:600: warning: format not a string literal and no format arguments trigger.c:616: warning: format not a string literal and no format arguments trigger.c:628: warning: format not a string literal and no format arguments guc.c: In function 'set_config_option': guc.c:4424: warning: format not a string literal and no format arguments describe.c: In function 'describeOneTableDetails': describe.c:1294: warning: format not a string literal and no format arguments Alan
*** a/src/backend/commands/tablecmds.c --- b/src/backend/commands/tablecmds.c *************** DropErrorMsgWrongType(const char *relnam *** 599,609 **** /* wrongkind could be something we don't have in our table... */ ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg(rentry->nota_msg, relname), ! (wentry->kind != '\0') ? errhint(wentry->drophint_msg) : 0)); } /* * RemoveRelations * Implements DROP TABLE, DROP INDEX, DROP SEQUENCE, DROP VIEW --- 599,609 ---- /* wrongkind could be something we don't have in our table... */ ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg(rentry->nota_msg, relname), ! (wentry->kind != '\0') ? errhint("%s", wentry->drophint_msg) : 0)); } /* * RemoveRelations * Implements DROP TABLE, DROP INDEX, DROP SEQUENCE, DROP VIEW
*** a/src/backend/commands/trigger.c --- b/src/backend/commands/trigger.c *************** ConvertTriggerToFK(CreateTrigStmt *stmt, *** 598,608 **** MemoryContext oldContext; ereport(NOTICE, (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", constr_name, buf.data), ! errdetail(funcdescr[funcnum]))); oldContext = MemoryContextSwitchTo(TopMemoryContext); info = (OldTriggerInfo *) palloc0(sizeof(OldTriggerInfo)); info->args = copyObject(stmt->args); info->funcoids[funcnum] = funcoid; info_list = lappend(info_list, info); --- 598,608 ---- MemoryContext oldContext; ereport(NOTICE, (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", constr_name, buf.data), ! errdetail("%s", funcdescr[funcnum]))); oldContext = MemoryContextSwitchTo(TopMemoryContext); info = (OldTriggerInfo *) palloc0(sizeof(OldTriggerInfo)); info->args = copyObject(stmt->args); info->funcoids[funcnum] = funcoid; info_list = lappend(info_list, info); *************** ConvertTriggerToFK(CreateTrigStmt *stmt, *** 614,624 **** { /* Second trigger of set */ ereport(NOTICE, (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", constr_name, buf.data), ! errdetail(funcdescr[funcnum]))); } else { /* OK, we have a set, so make the FK constraint ALTER TABLE cmd */ AlterTableStmt *atstmt = makeNode(AlterTableStmt); --- 614,624 ---- { /* Second trigger of set */ ereport(NOTICE, (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", constr_name, buf.data), ! errdetail("%s", funcdescr[funcnum]))); } else { /* OK, we have a set, so make the FK constraint ALTER TABLE cmd */ AlterTableStmt *atstmt = makeNode(AlterTableStmt); *************** ConvertTriggerToFK(CreateTrigStmt *stmt, *** 626,636 **** FkConstraint *fkcon = makeNode(FkConstraint); ereport(NOTICE, (errmsg("converting trigger group into constraint \"%s\" %s", constr_name, buf.data), ! errdetail(funcdescr[funcnum]))); if (funcnum == 2) { /* This trigger is on the FK table */ atstmt->relation = stmt->relation; if (stmt->constrrel) --- 626,636 ---- FkConstraint *fkcon = makeNode(FkConstraint); ereport(NOTICE, (errmsg("converting trigger group into constraint \"%s\" %s", constr_name, buf.data), ! errdetail("%s", funcdescr[funcnum]))); if (funcnum == 2) { /* This trigger is on the FK table */ atstmt->relation = stmt->relation; if (stmt->constrrel) *** a/src/backend/tcop/utility.c --- b/src/backend/tcop/utility.c *************** DropErrorMsgWrongType(char *relname, cha *** 127,137 **** /* wrongkind could be something we don't have in our table... */ ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg(rentry->nota_msg, relname), ! (wentry->kind != '\0') ? errhint(wentry->drophint_msg) : 0)); } /* * Emit the right error message for a "DROP" command issued on a * non-existent relation --- 127,137 ---- /* wrongkind could be something we don't have in our table... */ ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg(rentry->nota_msg, relname), ! (wentry->kind != '\0') ? errhint("%s", wentry->drophint_msg) : 0)); } /* * Emit the right error message for a "DROP" command issued on a * non-existent relation *** a/src/backend/utils/misc/guc.c --- b/src/backend/utils/misc/guc.c *************** set_config_option(const char *name, cons *** 4423,4433 **** { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid value for parameter \"%s\": \"%s\"", name, value), ! hintmsg ? errhint(hintmsg) : 0)); return false; } if (newval < conf->min || newval > conf->max) { ereport(elevel, --- 4423,4433 ---- { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid value for parameter \"%s\": \"%s\"", name, value), ! hintmsg ? errhint("%s", hintmsg) : 0)); return false; } if (newval < conf->min || newval > conf->max) { ereport(elevel, *** a/src/bin/psql/describe.c --- b/src/bin/psql/describe.c *************** describeOneTableDetails(const char *sche *** 1289,1299 **** if (add_tablespace_footer('i', atooid(PQgetvalue(result1, i, 6)), footers, &count_footers, tmpbuf, false)) { appendPQExpBuffer(&buf, ", "); ! appendPQExpBuffer(&buf, tmpbuf.data); count_footers -= 2; } else count_footers -= 1; --- 1289,1299 ---- if (add_tablespace_footer('i', atooid(PQgetvalue(result1, i, 6)), footers, &count_footers, tmpbuf, false)) { appendPQExpBuffer(&buf, ", "); ! appendPQExpBuffer(&buf, "%s", tmpbuf.data); count_footers -= 2; } else count_footers -= 1;
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers