]> git.eshelyaron.com Git - emacs.git/commitdiff
* coding.c (detect_coding_iso_2022): Initialize a local variable that might
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 8 Mar 2011 07:36:31 +0000 (23:36 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 8 Mar 2011 07:36:31 +0000 (23:36 -0800)
be used uninitialized.  Leave a FIXME because it's not clear that
this initialization is needed.

src/ChangeLog
src/coding.c

index 07a7c1736ce81cdd8b00acb300e7e1719fbf2b53..2020fa3bb110958e0b6e7430b56bb10d2ff8dbfd 100644 (file)
@@ -56,6 +56,9 @@
        (decode_coding_object, encode_coding_object, detect_coding_system):
        (decode_coding_emacs_mule): Mark variables that gcc
        -Wuninitialized does not deduce are never used uninitialized.
+       (detect_coding_iso_2022): Initialize a local variable that might
+       be used uninitialized.  Leave a FIXME because it's not clear that
+       this initialization is needed.
        (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
        (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
        (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
index 096268d1a729a730e89e27a61ff3fc3fdd329e7d..9a6a4484e5074048cebd5d58b694e390c4573842 100644 (file)
@@ -2954,7 +2954,12 @@ detect_coding_iso_2022 (struct coding_system *coding,
   const unsigned char *src_end = coding->source + coding->src_bytes;
   int multibytep = coding->src_multibyte;
   int single_shifting = 0;
-  int id;
+
+  /* FIXME: Does ID need to be initialized here?  The "End of composition"
+     code below does not initialize ID even though ID is used
+     afterwards, and perhaps that is a bug.  */
+  int id = 0;
+
   int c, c1;
   int consumed_chars = 0;
   int i;