From c9d4d382e6b4d2f1885e59296cf586fdaf26b66c Mon Sep 17 00:00:00 2001 From: cab788 Date: Wed, 27 May 2020 12:34:16 +0000 Subject: [PATCH 1/2] avoid compiler warnings --- giraffez/src/_compat.h | 4 +++- giraffez/src/errors.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/giraffez/src/_compat.h b/giraffez/src/_compat.h index bb3fdd0..5cfdad4 100644 --- a/giraffez/src/_compat.h +++ b/giraffez/src/_compat.h @@ -89,7 +89,9 @@ #endif #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 6 - #define _PyObject_GC_UNTRACK PyObject_GC_UnTrack + #define _PyObject_GC_UnTrack PyObject_GC_UnTrack +#else + #define _PyObject_GC_UnTrack _PyObject_GC_UNTRACK #endif #if defined(WIN32) || defined(WIN64) diff --git a/giraffez/src/errors.c b/giraffez/src/errors.c index 78f7fcc..5ef78ed 100644 --- a/giraffez/src/errors.c +++ b/giraffez/src/errors.c @@ -85,7 +85,7 @@ static int TeradataError_clear(TeradataErrorObject *self) { } static void TeradataError_dealloc(TeradataErrorObject *self) { - _PyObject_GC_UNTRACK(self); + _PyObject_GC_UnTrack(self); TeradataError_clear(self); Py_TYPE(self)->tp_free((PyObject*)self); } From 6ac2fbe8ff2ef56781cdceb4bfa16f3835759615 Mon Sep 17 00:00:00 2001 From: cab788 Date: Wed, 27 May 2020 12:42:00 +0000 Subject: [PATCH 2/2] remove unused var --- giraffez/src/convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/giraffez/src/convert.c b/giraffez/src/convert.c index a7422b5..8b68909 100644 --- a/giraffez/src/convert.c +++ b/giraffez/src/convert.c @@ -895,7 +895,7 @@ int _clz(uint32_t x) { PyObject* teradata_number_from_pystring(PyObject *item, unsigned char **buf, uint16_t *packed_length) { char *s; - int i, j, sign = 0, b, r, count = 0; + int i, sign = 0, b, r, count = 0; PyObject *n, *nn = NULL, *str, *zero, *mask, *shift; int8_t length = 0; int16_t scale = 0;