From: Neal Norwitz Date: Sat, 28 Oct 2006 21:37:16 +0000 (+0000) Subject: Backport 52502: X-Git-Tag: v2.5.1c1~288 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e3ec048f988b08392cc04c8cb7cf4d66da11580;p=python Backport 52502: Fix warnings with HP's C compiler. It doesn't recognize that infinite loops are, um, infinite. These conditions should not be able to happen. --- diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 4e827980b5..e127d96a3c 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -307,6 +307,8 @@ lookdict(dictobject *mp, PyObject *key, register long hash) else if (ep->me_key == dummy && freeslot == NULL) freeslot = ep; } + assert(0); /* NOT REACHED */ + return 0; } /* @@ -366,6 +368,8 @@ lookdict_string(dictobject *mp, PyObject *key, register long hash) if (ep->me_key == dummy && freeslot == NULL) freeslot = ep; } + assert(0); /* NOT REACHED */ + return 0; } /* diff --git a/Objects/setobject.c b/Objects/setobject.c index 440b2fba11..9d72b33c0d 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -179,6 +179,8 @@ set_lookkey_string(PySetObject *so, PyObject *key, register long hash) if (entry->key == dummy && freeslot == NULL) freeslot = entry; } + assert(0); /* NOT REACHED */ + return 0; } /*