[Python-checkins] r42744 - python/trunk/Modules/unicodedata.c

thomas.wouters python-checkins at python.org
Wed Mar 1 22:58:31 CET 2006


Author: thomas.wouters
Date: Wed Mar  1 22:58:30 2006
New Revision: 42744

Modified:
   python/trunk/Modules/unicodedata.c
Log:

Remove gcc (4.0.x) warning about uninitialized value by explicitly setting
the sentinel value in the main function, rather than the helper. This
function could possibly do with an early-out if any of the helper calls ends
up with a len of 0, but I doubt it really matters (how common are malformed
hangul syllables, really?)



Modified: python/trunk/Modules/unicodedata.c
==============================================================================
--- python/trunk/Modules/unicodedata.c	(original)
+++ python/trunk/Modules/unicodedata.c	Wed Mar  1 22:58:30 2006
@@ -799,7 +799,6 @@
     }
     if (*len == -1) {
 	*len = 0;
-	*pos = -1;
     }
 }
 
@@ -812,7 +811,7 @@
 
     /* Check for hangul syllables. */
     if (strncmp(name, "HANGUL SYLLABLE ", 16) == 0) {
-	int L, V, T, len;
+	int len, L = -1, V = -1, T = -1;
 	const char *pos = name + 16;
 	find_syllable(pos, &len, &L, LCount, 0);
 	pos += len;


More information about the Python-checkins mailing list