[Python-checkins] r52508 - python/branches/release25-maint/Objects/dictobject.c python/branches/release25-maint/Objects/setobject.c

neal.norwitz python-checkins at python.org
Sat Oct 28 23:37:17 CEST 2006


Author: neal.norwitz
Date: Sat Oct 28 23:37:16 2006
New Revision: 52508

Modified:
   python/branches/release25-maint/Objects/dictobject.c
   python/branches/release25-maint/Objects/setobject.c
Log:
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.


Modified: python/branches/release25-maint/Objects/dictobject.c
==============================================================================
--- python/branches/release25-maint/Objects/dictobject.c	(original)
+++ python/branches/release25-maint/Objects/dictobject.c	Sat Oct 28 23:37:16 2006
@@ -307,6 +307,8 @@
 		else if (ep->me_key == dummy && freeslot == NULL)
 			freeslot = ep;
 	}
+	assert(0);	/* NOT REACHED */
+	return 0;
 }
 
 /*
@@ -366,6 +368,8 @@
 		if (ep->me_key == dummy && freeslot == NULL)
 			freeslot = ep;
 	}
+	assert(0);	/* NOT REACHED */
+	return 0;
 }
 
 /*

Modified: python/branches/release25-maint/Objects/setobject.c
==============================================================================
--- python/branches/release25-maint/Objects/setobject.c	(original)
+++ python/branches/release25-maint/Objects/setobject.c	Sat Oct 28 23:37:16 2006
@@ -179,6 +179,8 @@
 		if (entry->key == dummy && freeslot == NULL)
 			freeslot = entry;
 	}
+	assert(0);	/* NOT REACHED */
+	return 0;
 }
 
 /*


More information about the Python-checkins mailing list