]> granicus.if.org Git - python/commitdiff
Silence Coverity false alerts with CIDs #172, #183, #184
authorChristian Heimes <christian@cheimes.de>
Fri, 18 Jan 2008 19:12:56 +0000 (19:12 +0000)
committerChristian Heimes <christian@cheimes.de>
Fri, 18 Jan 2008 19:12:56 +0000 (19:12 +0000)
Modules/_sre.c
Objects/longobject.c

index d79d5a717332baf8b09bd654e0d88e2ee61c910b..808fb57528a5fa085c95d930f443c5299f00c559 100644 (file)
@@ -2678,7 +2678,7 @@ _compile(PyObject* self_, PyObject* args)
         return NULL;
 
     n = PyList_GET_SIZE(code);
-
+    /* coverity[ampersand_in_size] */
     self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, n);
     if (!self)
         return NULL;
@@ -3185,6 +3185,7 @@ pattern_new_match(PatternObject* pattern, SRE_STATE* state, int status)
     if (status > 0) {
 
         /* create match object (with room for extra group marks) */
+        /* coverity[ampersand_in_size] */
         match = PyObject_NEW_VAR(MatchObject, &Match_Type,
                                  2*(pattern->groups+1));
         if (!match)
index 1094670303ecc814c49f8d0ca7f36c73e82014db..e1e9b51cbdc0fb79b8cf8ac9be2550f889640b0e 100644 (file)
@@ -70,6 +70,7 @@ _PyLong_New(Py_ssize_t size)
                PyErr_NoMemory();
                return NULL;
        }
+       /* coverity[ampersand_in_size] */
        return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size);
 }