]> granicus.if.org Git - python/commitdiff
Backport 52502:
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 28 Oct 2006 21:37:16 +0000 (21:37 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 28 Oct 2006 21:37:16 +0000 (21:37 +0000)
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.

Objects/dictobject.c
Objects/setobject.c

index 4e827980b57f88241554756595d3e5454b9fe09b..e127d96a3c79a8be51a56bce3f78f0e7fd104d2e 100644 (file)
@@ -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;
 }
 
 /*
index 440b2fba112cd94c1acad1061bf7ca0f4d3f6e4d..9d72b33c0d32e066a844d9063bea2dca776209ea 100644 (file)
@@ -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;
 }
 
 /*