* Problem report #111 [1/2]: base/src/emacs/src/coding.c (detect_coding_system); UNINIT
@ 2008-12-02 22:19 Dan Nicolaescu
2008-12-03 5:20 ` Kenichi Handa
0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2008-12-02 22:19 UTC (permalink / raw)
To: emacs-devel
CID: 111
Checker: UNINIT (help)
File: base/src/emacs/src/coding.c
Function: detect_coding_system
Description: Using uninitialized value "utf_16_le_eol"
Event var_decl: Declared variable "utf_16_le_eol" without initializer
Also see events: [uninit_use]
7870 int normal_eol = -1, utf_16_be_eol = -1, utf_16_le_eol;
7871 Lisp_Object tail;
7872
At conditional (1): "eol_type & 7 == 4" taking true path
At conditional (2): "((0), (eol_type & -8))->size & 4611686018427387904 == 0" taking true path
7873 if (VECTORP (eol_type))
7874 {
At conditional (3): "(detect_info).found & -15873 != 0" taking true path
7875 if (detect_info.found & ~CATEGORY_MASK_UTF_16)
7876 {
At conditional (4): "null_byte_found != 0" taking false path
7877 if (null_byte_found)
7878 normal_eol = EOL_SEEN_LF;
7879 else
7880 normal_eol = detect_eol (coding.source, src_bytes,
7881 coding_category_raw_text);
7882 }
At conditional (5): "(detect_info).found & 5120 != 0" taking true path
7883 if (detect_info.found & (CATEGORY_MASK_UTF_16_BE
7884 | CATEGORY_MASK_UTF_16_BE_NOSIG))
7885 utf_16_be_eol = detect_eol (coding.source, src_bytes,
7886 coding_category_utf_16_be);
At conditional (6): "(detect_info).found & 10240 != 0" taking false path
7887 if (detect_info.found & (CATEGORY_MASK_UTF_16_LE
7888 | CATEGORY_MASK_UTF_16_LE_NOSIG))
7889 utf_16_le_eol = detect_eol (coding.source, src_bytes,
7890 coding_category_utf_16_le);
7891 }
7892 else
7893 {
7894 if (EQ (eol_type, Qunix))
7895 normal_eol = utf_16_be_eol = utf_16_le_eol = EOL_SEEN_LF;
7896 else if (EQ (eol_type, Qdos))
7897 normal_eol = utf_16_be_eol = utf_16_le_eol = EOL_SEEN_CRLF;
7898 else
7899 normal_eol = utf_16_be_eol = utf_16_le_eol = EOL_SEEN_CR;
7900 }
7901
At conditional (7): "tail & 7 == 5" taking true path
At conditional (12): "tail & 7 == 5" taking true path
7902 for (tail = val; CONSP (tail); tail = XCDR (tail))
7903 {
7904 enum coding_category category;
7905 int this_eol;
7906
7907 id = XINT (XCAR (tail));
7908 attrs = CODING_ID_ATTRS (id);
7909 category = XINT (CODING_ATTR_CATEGORY (attrs));
7910 eol_type = CODING_ID_EOL_TYPE (id);
At conditional (8): "eol_type & 7 == 4" taking true path
At conditional (9): "((0), (eol_type & -8))->size & 4611686018427387904 == 0" taking true path
At conditional (13): "eol_type & 7 == 4" taking true path
At conditional (14): "((0), (eol_type & -8))->size & 4611686018427387904 == 0" taking true path
7911 if (VECTORP (eol_type))
7912 {
At conditional (10): "category == 10" taking true path
At conditional (15): "category == 10" taking false path
At conditional (16): "category == 12" taking false path
7913 if (category == coding_category_utf_16_be
7914 || category == coding_category_utf_16_be_nosig)
7915 this_eol = utf_16_be_eol;
At conditional (17): "category == 11" taking true path
7916 else if (category == coding_category_utf_16_le
7917 || category == coding_category_utf_16_le_nosig)
Event uninit_use: Using uninitialized value "utf_16_le_eol"
Also see events: [var_decl]
7918 this_eol = utf_16_le_eol;
7919 else
7920 this_eol = normal_eol;
7921
At conditional (11): "this_eol == 1" taking true path
7922 if (this_eol == EOL_SEEN_LF)
7923 XSETCAR (tail, AREF (eol_type, 0));
7924 else if (this_eol == EOL_SEEN_CRLF)
7925 XSETCAR (tail, AREF (eol_type, 1));
7926 else if (this_eol == EOL_SEEN_CR)
7927 XSETCAR (tail, AREF (eol_type, 2));
7928 else
7929 XSETCAR (tail, CODING_ID_NAME (id));
7930 }
7931 else
7932 XSETCAR (tail, CODING_ID_NAME (id));
7933 }
7934 }
7935
7936 return (highest ? XCAR (val) : val);
7937 }
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem report #111 [1/2]: base/src/emacs/src/coding.c (detect_coding_system); UNINIT
2008-12-02 22:19 Problem report #111 [1/2]: base/src/emacs/src/coding.c (detect_coding_system); UNINIT Dan Nicolaescu
@ 2008-12-03 5:20 ` Kenichi Handa
0 siblings, 0 replies; 2+ messages in thread
From: Kenichi Handa @ 2008-12-03 5:20 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel
In article <200812022219.mB2MJGvV021750@mothra.ics.uci.edu>, Dan Nicolaescu <dann@ics.uci.edu> writes:
> CID: 111
> Checker: UNINIT (help)
> File: base/src/emacs/src/coding.c
> Function: detect_coding_system
> Description: Using uninitialized value "utf_16_le_eol"
[...]
> Event uninit_use: Using uninitialized value "utf_16_le_eol"
> Also see events: [var_decl]
> 7918 this_eol = utf_16_le_eol;
> 7919 else
> 7920 this_eol = normal_eol;
> 7921
I installed a fix.
---
Kenichi Handa
handa@ni.aist.go.jp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-03 5:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 22:19 Problem report #111 [1/2]: base/src/emacs/src/coding.c (detect_coding_system); UNINIT Dan Nicolaescu
2008-12-03 5:20 ` Kenichi Handa
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).