]> git.eshelyaron.com Git - emacs.git/commitdiff
* charset.c (load_charset): Abort instead of using uninitialized var.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 8 Mar 2011 00:46:23 +0000 (16:46 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 8 Mar 2011 00:46:23 +0000 (16:46 -0800)
src/ChangeLog
src/charset.c

index c108bb38bea8ec24a16cc3ba2a45b91c16dfcdfe..02dc5390f38c323af512bc7e70eae459953b7b49 100644 (file)
@@ -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  <cyd@stupidchicken.com>
 
index e46dadab93ab9615d87b397c8d6850e2ba027806..d82b29ae44b8dc1f46a5c5b2d427c8dc908e17f9 100644 (file)
@@ -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