From: Daniele Varrazzo Date: Sun, 2 Jan 2022 16:54:36 +0000 (+0100) Subject: Fix spurious warning about variable referenced before assignment X-Git-Tag: pool-3.1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d599eccef5089b2bc5b70b0e3977a9f6a78e5a3;p=thirdparty%2Fpsycopg.git Fix spurious warning about variable referenced before assignment --- diff --git a/psycopg_c/psycopg_c/_psycopg/generators.pyx b/psycopg_c/psycopg_c/_psycopg/generators.pyx index d5def6401..836ef2c7d 100644 --- a/psycopg_c/psycopg_c/_psycopg/generators.pyx +++ b/psycopg_c/psycopg_c/_psycopg/generators.pyx @@ -146,7 +146,7 @@ def fetch(pq.PGconn pgconn) -> PQGen[Optional[PGresult]]: """ cdef libpq.PGconn *pgconn_ptr = pgconn._pgconn_ptr cdef libpq.PGnotify *notify - cdef int cires, ibres + cdef int cires, ibres = 0 cdef object notify_handler = pgconn.notify_handler cdef libpq.PGresult *pgres