mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
Fix compiler warnings
Older versions of GCC appear to report these with the current standard option set, newer versions need -Wformat-security.
This commit is contained in:
parent
4fec63f94e
commit
ddf8c16822
@ -3465,7 +3465,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args)
|
|||||||
Py_XDECREF(so);
|
Py_XDECREF(so);
|
||||||
|
|
||||||
/* Make Python raise the exception */
|
/* Make Python raise the exception */
|
||||||
PLy_exception_set(PLy_exc_error, edata->message);
|
PLy_exception_set(PLy_exc_error, "%s", edata->message);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
PG_END_TRY();
|
PG_END_TRY();
|
||||||
@ -3620,13 +3620,13 @@ PLy_elog(int elevel, const char *fmt,...)
|
|||||||
ereport(elevel,
|
ereport(elevel,
|
||||||
(errmsg("PL/Python: %s", emsg.data),
|
(errmsg("PL/Python: %s", emsg.data),
|
||||||
(xmsg) ? errdetail("%s", xmsg) : 0,
|
(xmsg) ? errdetail("%s", xmsg) : 0,
|
||||||
(hint) ? errhint(hint) : 0,
|
(hint) ? errhint("%s", hint) : 0,
|
||||||
(query) ? internalerrquery(query) : 0,
|
(query) ? internalerrquery(query) : 0,
|
||||||
(position) ? internalerrposition(position) : 0));
|
(position) ? internalerrposition(position) : 0));
|
||||||
else
|
else
|
||||||
ereport(elevel,
|
ereport(elevel,
|
||||||
(errmsg("PL/Python: %s", xmsg),
|
(errmsg("PL/Python: %s", xmsg),
|
||||||
(hint) ? errhint(hint) : 0,
|
(hint) ? errhint("%s", hint) : 0,
|
||||||
(query) ? internalerrquery(query) : 0,
|
(query) ? internalerrquery(query) : 0,
|
||||||
(position) ? internalerrposition(position) : 0));
|
(position) ? internalerrposition(position) : 0));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user