From: Paul Eggert Date: Tue, 8 Mar 2011 00:46:23 +0000 (-0800) Subject: * charset.c (load_charset): Abort instead of using uninitialized var. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~605^2^2~63 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0ac2c2991c1cba4e3c6e5f7b62c7d61b01d69994;p=emacs.git * charset.c (load_charset): Abort instead of using uninitialized var. --- diff --git a/src/ChangeLog b/src/ChangeLog index c108bb38bea..02dc5390f38 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -36,6 +36,7 @@ and to avoid gcc -Wuninitialized warning. (load_charset_map): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. + (load_charset): Abort instead of using uninitialized var. 2011-03-06 Chong Yidong diff --git a/src/charset.c b/src/charset.c index e46dadab93a..d82b29ae44b 100644 --- a/src/charset.c +++ b/src/charset.c @@ -630,8 +630,12 @@ load_charset (struct charset *charset, int control_flag) if (CHARSET_METHOD (charset) == CHARSET_METHOD_MAP) map = CHARSET_MAP (charset); - else if (CHARSET_UNIFIED_P (charset)) - map = CHARSET_UNIFY_MAP (charset); + else + { + if (! CHARSET_UNIFIED_P (charset)) + abort (); + map = CHARSET_UNIFY_MAP (charset); + } if (STRINGP (map)) load_charset_map_from_file (charset, map, control_flag); else