Get rid of compiler warnings

This commit is contained in:
Neal Norwitz 2003-01-10 15:29:16 +00:00
parent 3cb68a2512
commit 8e914d9a1d
2 changed files with 19 additions and 19 deletions

View File

@ -3668,8 +3668,9 @@ time_new(PyTypeObject *type, PyObject *args, PyObject *kw)
static void static void
time_dealloc(PyDateTime_Time *self) time_dealloc(PyDateTime_Time *self)
{ {
if (self->hastzinfo) if (self->hastzinfo) {
Py_XDECREF(self->tzinfo); Py_XDECREF(self->tzinfo);
}
self->ob_type->tp_free((PyObject *)self); self->ob_type->tp_free((PyObject *)self);
} }
@ -4030,7 +4031,6 @@ static PyObject *
time_unpickler(PyObject *module, PyObject *arg) time_unpickler(PyObject *module, PyObject *arg)
{ {
PyDateTime_Time *self; PyDateTime_Time *self;
PyObject *tzinfo = Py_None;
/* We don't want to allocate space for tzinfo if it's not needed. /* We don't want to allocate space for tzinfo if it's not needed.
* Figuring that out in advance is irritating, so for now we * Figuring that out in advance is irritating, so for now we

View File

@ -7658,55 +7658,55 @@ all_ins(PyObject *d)
/* These come from sysexits.h */ /* These come from sysexits.h */
#ifdef EX_OK #ifdef EX_OK
if (ins(d, "EX_OK", (long)EX_OK)) return -1; if (ins(d, "EX_OK", (long)EX_OK)) return -1;
#endif EX_OK #endif /* EX_OK */
#ifdef EX_USAGE #ifdef EX_USAGE
if (ins(d, "EX_USAGE", (long)EX_USAGE)) return -1; if (ins(d, "EX_USAGE", (long)EX_USAGE)) return -1;
#endif EX_USAGE #endif /* EX_USAGE */
#ifdef EX_DATAERR #ifdef EX_DATAERR
if (ins(d, "EX_DATAERR", (long)EX_DATAERR)) return -1; if (ins(d, "EX_DATAERR", (long)EX_DATAERR)) return -1;
#endif EX_DATAERR #endif /* EX_DATAERR */
#ifdef EX_NOINPUT #ifdef EX_NOINPUT
if (ins(d, "EX_NOINPUT", (long)EX_NOINPUT)) return -1; if (ins(d, "EX_NOINPUT", (long)EX_NOINPUT)) return -1;
#endif EX_NOINPUT #endif /* EX_NOINPUT */
#ifdef EX_NOUSER #ifdef EX_NOUSER
if (ins(d, "EX_NOUSER", (long)EX_NOUSER)) return -1; if (ins(d, "EX_NOUSER", (long)EX_NOUSER)) return -1;
#endif EX_NOUSER #endif /* EX_NOUSER */
#ifdef EX_NOHOST #ifdef EX_NOHOST
if (ins(d, "EX_NOHOST", (long)EX_NOHOST)) return -1; if (ins(d, "EX_NOHOST", (long)EX_NOHOST)) return -1;
#endif EX_NOHOST #endif /* EX_NOHOST */
#ifdef EX_UNAVAILABLE #ifdef EX_UNAVAILABLE
if (ins(d, "EX_UNAVAILABLE", (long)EX_UNAVAILABLE)) return -1; if (ins(d, "EX_UNAVAILABLE", (long)EX_UNAVAILABLE)) return -1;
#endif EX_UNAVAILABLE #endif /* EX_UNAVAILABLE */
#ifdef EX_SOFTWARE #ifdef EX_SOFTWARE
if (ins(d, "EX_SOFTWARE", (long)EX_SOFTWARE)) return -1; if (ins(d, "EX_SOFTWARE", (long)EX_SOFTWARE)) return -1;
#endif EX_SOFTWARE #endif /* EX_SOFTWARE */
#ifdef EX_OSERR #ifdef EX_OSERR
if (ins(d, "EX_OSERR", (long)EX_OSERR)) return -1; if (ins(d, "EX_OSERR", (long)EX_OSERR)) return -1;
#endif EX_OSERR #endif /* EX_OSERR */
#ifdef EX_OSFILE #ifdef EX_OSFILE
if (ins(d, "EX_OSFILE", (long)EX_OSFILE)) return -1; if (ins(d, "EX_OSFILE", (long)EX_OSFILE)) return -1;
#endif EX_OSFILE #endif /* EX_OSFILE */
#ifdef EX_CANTCREAT #ifdef EX_CANTCREAT
if (ins(d, "EX_CANTCREAT", (long)EX_CANTCREAT)) return -1; if (ins(d, "EX_CANTCREAT", (long)EX_CANTCREAT)) return -1;
#endif EX_CANTCREAT #endif /* EX_CANTCREAT */
#ifdef EX_IOERR #ifdef EX_IOERR
if (ins(d, "EX_IOERR", (long)EX_IOERR)) return -1; if (ins(d, "EX_IOERR", (long)EX_IOERR)) return -1;
#endif EX_IOERR #endif /* EX_IOERR */
#ifdef EX_TEMPFAIL #ifdef EX_TEMPFAIL
if (ins(d, "EX_TEMPFAIL", (long)EX_TEMPFAIL)) return -1; if (ins(d, "EX_TEMPFAIL", (long)EX_TEMPFAIL)) return -1;
#endif EX_TEMPFAIL #endif /* EX_TEMPFAIL */
#ifdef EX_PROTOCOL #ifdef EX_PROTOCOL
if (ins(d, "EX_PROTOCOL", (long)EX_PROTOCOL)) return -1; if (ins(d, "EX_PROTOCOL", (long)EX_PROTOCOL)) return -1;
#endif EX_PROTOCOL #endif /* EX_PROTOCOL */
#ifdef EX_NOPERM #ifdef EX_NOPERM
if (ins(d, "EX_NOPERM", (long)EX_NOPERM)) return -1; if (ins(d, "EX_NOPERM", (long)EX_NOPERM)) return -1;
#endif EX_NOPERM #endif /* EX_NOPERM */
#ifdef EX_CONFIG #ifdef EX_CONFIG
if (ins(d, "EX_CONFIG", (long)EX_CONFIG)) return -1; if (ins(d, "EX_CONFIG", (long)EX_CONFIG)) return -1;
#endif EX_CONFIG #endif /* EX_CONFIG */
#ifdef EX_NOTFOUND #ifdef EX_NOTFOUND
if (ins(d, "EX_NOTFOUND", (long)EX_NOTFOUND)) return -1; if (ins(d, "EX_NOTFOUND", (long)EX_NOTFOUND)) return -1;
#endif EX_NOTFOUND #endif /* EX_NOTFOUND */
#ifdef HAVE_SPAWNV #ifdef HAVE_SPAWNV
#if defined(PYOS_OS2) && defined(PYCC_GCC) #if defined(PYOS_OS2) && defined(PYCC_GCC)