Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ddf8c16

Browse files
committed
Fix compiler warnings
Older versions of GCC appear to report these with the current standard option set, newer versions need -Wformat-security.
1 parent 4fec63f commit ddf8c16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pl/plpython/plpython.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3465,7 +3465,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args)
34653465
Py_XDECREF(so);
34663466

34673467
/* Make Python raise the exception */
3468-
PLy_exception_set(PLy_exc_error, edata->message);
3468+
PLy_exception_set(PLy_exc_error, "%s", edata->message);
34693469
return NULL;
34703470
}
34713471
PG_END_TRY();
@@ -3620,13 +3620,13 @@ PLy_elog(int elevel, const char *fmt,...)
36203620
ereport(elevel,
36213621
(errmsg("PL/Python: %s", emsg.data),
36223622
(xmsg) ? errdetail("%s", xmsg) : 0,
3623-
(hint) ? errhint(hint) : 0,
3623+
(hint) ? errhint("%s", hint) : 0,
36243624
(query) ? internalerrquery(query) : 0,
36253625
(position) ? internalerrposition(position) : 0));
36263626
else
36273627
ereport(elevel,
36283628
(errmsg("PL/Python: %s", xmsg),
3629-
(hint) ? errhint(hint) : 0,
3629+
(hint) ? errhint("%s", hint) : 0,
36303630
(query) ? internalerrquery(query) : 0,
36313631
(position) ? internalerrposition(position) : 0));
36323632
}

0 commit comments

Comments
 (0)