From: Tim Peters Date: Tue, 20 Aug 2002 14:31:35 +0000 (+0000) Subject: getinstclassname(): Squash new compiler wng in assert (comparison of X-Git-Tag: v2.3c1~4391 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75585d4ec18c3b4d42d033c0004a61b6d0704d30;p=python getinstclassname(): Squash new compiler wng in assert (comparison of signed vs unsigned). --- diff --git a/Objects/classobject.c b/Objects/classobject.c index cbbb3c46bc..f698cc323d 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -2328,7 +2328,7 @@ getinstclassname(PyObject *inst, char *buf, int bufsize) PyObject *class; if (inst == NULL) { - assert(bufsize > strlen("nothing")); + assert(bufsize > 0 && (size_t)bufsize > strlen("nothing")); strcpy(buf, "nothing"); return; }