diff options
| author | Paul Eggert | 2011-03-07 23:36:31 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-07 23:36:31 -0800 |
| commit | 160b01f65a12a9e6893c270662d6ae249a1db300 (patch) | |
| tree | ff089d2e38c2229577d3c1a550d264b3ba8415cc /src | |
| parent | ee05f96119932f5e4f33b59e1a2f4abdd9c0a34a (diff) | |
| download | emacs-160b01f65a12a9e6893c270662d6ae249a1db300.tar.gz emacs-160b01f65a12a9e6893c270662d6ae249a1db300.zip | |
* coding.c (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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/coding.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 07a7c1736ce..2020fa3bb11 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -56,6 +56,9 @@ | |||
| 56 | (decode_coding_object, encode_coding_object, detect_coding_system): | 56 | (decode_coding_object, encode_coding_object, detect_coding_system): |
| 57 | (decode_coding_emacs_mule): Mark variables that gcc | 57 | (decode_coding_emacs_mule): Mark variables that gcc |
| 58 | -Wuninitialized does not deduce are never used uninitialized. | 58 | -Wuninitialized does not deduce are never used uninitialized. |
| 59 | (detect_coding_iso_2022): Initialize a local variable that might | ||
| 60 | be used uninitialized. Leave a FIXME because it's not clear that | ||
| 61 | this initialization is needed. | ||
| 59 | (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT): | 62 | (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT): |
| 60 | (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P): | 63 | (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P): |
| 61 | (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER): | 64 | (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER): |
diff --git a/src/coding.c b/src/coding.c index 096268d1a72..9a6a4484e50 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -2954,7 +2954,12 @@ detect_coding_iso_2022 (struct coding_system *coding, | |||
| 2954 | const unsigned char *src_end = coding->source + coding->src_bytes; | 2954 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 2955 | int multibytep = coding->src_multibyte; | 2955 | int multibytep = coding->src_multibyte; |
| 2956 | int single_shifting = 0; | 2956 | int single_shifting = 0; |
| 2957 | int id; | 2957 | |
| 2958 | /* FIXME: Does ID need to be initialized here? The "End of composition" | ||
| 2959 | code below does not initialize ID even though ID is used | ||
| 2960 | afterwards, and perhaps that is a bug. */ | ||
| 2961 | int id = 0; | ||
| 2962 | |||
| 2958 | int c, c1; | 2963 | int c, c1; |
| 2959 | int consumed_chars = 0; | 2964 | int consumed_chars = 0; |
| 2960 | int i; | 2965 | int i; |