From bcd7fca543d74c646ca24d53a6c5fff0b963a222 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 21 Jan 2019 01:21:33 +0000 Subject: [PATCH] replication_cursor_type: solved cpychecker false positives --- psycopg/replication_cursor_type.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/psycopg/replication_cursor_type.c b/psycopg/replication_cursor_type.c index 91e0cde5..794a3245 100644 --- a/psycopg/replication_cursor_type.c +++ b/psycopg/replication_cursor_type.c @@ -130,6 +130,9 @@ psyco_repl_curs_consume_stream(replicationCursorObject *self, res = Py_None; Py_INCREF(res); } + else { + FAKE_RAISE(); + } self->consuming = 0; @@ -150,6 +153,7 @@ psyco_repl_curs_read_message(replicationCursorObject *self, PyObject *dummy) EXC_IF_TPC_PREPARED(self->cur.conn, read_message); if (pq_read_replication_message(self, &msg) < 0) { + FAKE_RAISE(); return NULL; } if (msg) { @@ -188,6 +192,7 @@ psyco_repl_curs_send_feedback(replicationCursorObject *self, self->apply_lsn = apply_lsn; if (pq_send_replication_feedback(self, reply) < 0) { + FAKE_RAISE(); return NULL; }