Mercurial > emacs
changeset 100135:0e17542db552
(detect_coding_system): Initialize utf_16_le_eol to -1, val to
Qnil.
(produce_chars): Initialize consumed_chars to 0.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 03 Dec 2008 02:25:00 +0000 |
parents | c48d4114962b |
children | 6ee9281fcd28 |
files | src/coding.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/coding.c Wed Dec 03 01:22:25 2008 +0000 +++ b/src/coding.c Wed Dec 03 02:25:00 2008 +0000 @@ -6330,7 +6330,7 @@ if (coding->src_multibyte) { int multibytep = 1; - EMACS_INT consumed_chars; + EMACS_INT consumed_chars = 0; while (1) { @@ -7690,7 +7690,7 @@ { const unsigned char *src_end = src + src_bytes; Lisp_Object attrs, eol_type; - Lisp_Object val; + Lisp_Object val = Qnil; struct coding_system coding; int id; struct coding_detection_info detect_info; @@ -7855,7 +7855,6 @@ { int mask = detect_info.rejected | detect_info.found; int found = 0; - val = Qnil; for (i = coding_category_raw_text - 1; i >= 0; i--) { @@ -7918,7 +7917,7 @@ /* Then, detect eol-format if necessary. */ { - int normal_eol = -1, utf_16_be_eol = -1, utf_16_le_eol; + int normal_eol = -1, utf_16_be_eol = -1, utf_16_le_eol = -1; Lisp_Object tail; if (VECTORP (eol_type)) @@ -7984,7 +7983,7 @@ } } - return (highest ? XCAR (val) : val); + return (highest ? (CONSP (val) ? XCAR (val) : Qnil) : val); }