Ignore checking a few functions triggering cpychecker bugs

With these changes cpychecker can run on the whole codebase without
crashing.
This commit is contained in:
Daniele Varrazzo 2019-01-21 20:14:31 +00:00
parent 18c34c2369
commit 0abf947cd8
3 changed files with 8 additions and 0 deletions

View File

@ -123,6 +123,7 @@ psyco_connect(PyObject *self, PyObject *args, PyObject *keywds)
#define psyco_parse_dsn_doc \ #define psyco_parse_dsn_doc \
"parse_dsn(dsn) -> dict -- parse a connection string into parameters" "parse_dsn(dsn) -> dict -- parse a connection string into parameters"
IGNORE_REFCOUNT /* bug #davidmalcolm/gcc-python-plugin#159 */
static PyObject * static PyObject *
psyco_parse_dsn(PyObject *self, PyObject *args, PyObject *kwargs) psyco_parse_dsn(PyObject *self, PyObject *args, PyObject *kwargs)
{ {
@ -165,6 +166,7 @@ exit:
" * `str`: A bytes or unicode object\n" \ " * `str`: A bytes or unicode object\n" \
" * `conn_or_curs`: A connection or cursor, required" " * `conn_or_curs`: A connection or cursor, required"
IGNORE_REFCOUNT /* bug #davidmalcolm/gcc-python-plugin#159 */
static PyObject * static PyObject *
psyco_quote_ident(PyObject *self, PyObject *args, PyObject *kwargs) psyco_quote_ident(PyObject *self, PyObject *args, PyObject *kwargs)
{ {
@ -421,6 +423,7 @@ psyco_libpq_version(PyObject *self, PyObject *dummy)
#define psyco_encrypt_password_doc \ #define psyco_encrypt_password_doc \
"encrypt_password(password, user, [scope], [algorithm]) -- Prepares the encrypted form of a PostgreSQL password.\n\n" "encrypt_password(password, user, [scope], [algorithm]) -- Prepares the encrypted form of a PostgreSQL password.\n\n"
IGNORE_REFCOUNT /* bug #davidmalcolm/gcc-python-plugin#159 */
static PyObject * static PyObject *
psyco_encrypt_password(PyObject *self, PyObject *args, PyObject *kwargs) psyco_encrypt_password(PyObject *self, PyObject *args, PyObject *kwargs)
{ {
@ -672,6 +675,7 @@ static struct {
}; };
IGNORE_REFCOUNT /* bug #davidmalcolm/gcc-python-plugin#159 */
RAISES_NEG static int RAISES_NEG static int
basic_errors_init(PyObject *module) basic_errors_init(PyObject *module)
{ {
@ -910,6 +914,7 @@ static struct {
{NULL} /* Sentinel */ {NULL} /* Sentinel */
}; };
IGNORE_REFCOUNT /* bug #davidmalcolm/gcc-python-plugin#159 */
RAISES_NEG static int RAISES_NEG static int
add_module_types(PyObject *module) add_module_types(PyObject *module)
{ {

View File

@ -440,6 +440,7 @@ typecast_traverse(typecastObject *self, visitproc visit, void *arg)
return 0; return 0;
} }
IGNORE_REFCOUNT /* bug davidmalcolm/gcc-python-plugin#159 */
static PyObject * static PyObject *
typecast_repr(PyObject *self) typecast_repr(PyObject *self)
{ {

View File

@ -218,6 +218,7 @@ static const char hex_lut[128] = {
* Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size. * Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size.
* In case of error set an exception and return NULL. * In case of error set an exception and return NULL.
*/ */
IGNORE_REFCOUNT /* bug davidmalcolm/gcc-python-plugin#155 */
static char * static char *
psycopg_parse_hex(const char *bufin, Py_ssize_t sizein, Py_ssize_t *sizeout) psycopg_parse_hex(const char *bufin, Py_ssize_t sizein, Py_ssize_t *sizeout)
{ {
@ -268,6 +269,7 @@ exit:
* Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size. * Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size.
* In case of error set an exception and return NULL. * In case of error set an exception and return NULL.
*/ */
IGNORE_REFCOUNT /* bug davidmalcolm/gcc-python-plugin#155 */
static char * static char *
psycopg_parse_escape(const char *bufin, Py_ssize_t sizein, Py_ssize_t *sizeout) psycopg_parse_escape(const char *bufin, Py_ssize_t sizein, Py_ssize_t *sizeout)
{ {