]> granicus.if.org Git - python/commitdiff
Issue #22218: Fix "comparison between signed and unsigned integers" warning in
authorVictor Stinner <victor.stinner@gmail.com>
Sun, 17 Aug 2014 19:09:30 +0000 (21:09 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Sun, 17 Aug 2014 19:09:30 +0000 (21:09 +0200)
Modules/_sqlite/cursor.c.

Modules/_sqlite/cursor.c

index db96b02519fb0b09532756ac4a7f0a57c64550d2..7fe00e32d2fa1eed9fb73926fed90419b428591a 100644 (file)
@@ -46,7 +46,7 @@ static pysqlite_StatementKind detect_statement_type(const char* statement)
 
     dst = buf;
     *dst = 0;
-    while (Py_ISALPHA(*src) && dst - buf < sizeof(buf) - 2) {
+    while (Py_ISALPHA(*src) && (dst - buf) < ((Py_ssize_t)sizeof(buf) - 2)) {
         *dst++ = Py_TOLOWER(*src++);
     }