]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fix spurious warning about variable referenced before assignment
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 2 Jan 2022 16:54:36 +0000 (17:54 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 2 Jan 2022 16:54:36 +0000 (17:54 +0100)
psycopg_c/psycopg_c/_psycopg/generators.pyx

index d5def64015344fc882f26bf9c2a63598e89267fe..836ef2c7d268680b43ac945f7aab806cd73af8ee 100644 (file)
@@ -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