emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem report #111 [1/2]: base/src/emacs/src/coding.c (detect_coding_sy


From: Dan Nicolaescu
Subject: Problem report #111 [1/2]: base/src/emacs/src/coding.c (detect_coding_system); UNINIT
Date: Tue, 2 Dec 2008 14:19:16 -0800 (PST)

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    }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]