emacs-devel
[Top][All Lists]
Advanced

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

Problem report #121: base/src/emacs/src/coding.c (decode_coding_charset)


From: Dan Nicolaescu
Subject: Problem report #121: base/src/emacs/src/coding.c (decode_coding_charset); UNINIT
Date: Tue, 02 Dec 2008 16:59:50 -0800

CID: 121
Checker: UNINIT (help)
File: base/src/emacs/src/coding.c
Function: decode_coding_charset
Description: Using uninitialized value "charset"

Event var_decl: Declared variable "charset" without initializer
Also see events: [uninit_use]

5085          struct charset *charset;
5086          int dim;
5087          int len = 1;
5088          unsigned code;
5089    
5090          src_base = src;
5091          consumed_chars_base = consumed_chars;
5092    

At conditional (1): "charbuf >= charbuf_end" taking false path

5093          if (charbuf >= charbuf_end)
5094            break;
5095    

At conditional (2): "byte_after_cr >= 0" taking false path

5096          if (byte_after_cr >= 0)
5097            {
5098              c = byte_after_cr;
5099              byte_after_cr = -1;
5100            }
5101          else
5102            {

At conditional (3): "src == src_end" taking false path
At conditional (4): "multibytep != 0" taking true path
At conditional (5): "c & 128 != 0" taking true path
At conditional (6): "c & 254 == 192" taking true path
At conditional (7): "0" taking false path

5103              ONE_MORE_BYTE (c);

At conditional (8): "eol_crlf != 0" taking true path
At conditional (9): "c == 13" taking false path

5104              if (eol_crlf && c == '\r')
5105                ONE_MORE_BYTE (byte_after_cr);
5106            }

At conditional (10): "c < 0" taking false path

5107          if (c < 0)
5108            goto invalid_code;
5109          code = c;
5110    
5111          val = AREF (valids, c);

At conditional (11): "val == Qnil" taking false path

5112          if (NILP (val))
5113            goto invalid_code;

At conditional (12): "val & 7 == 0" taking false path

5114          if (INTEGERP (val))
5115            {
5116              charset = CHARSET_FROM_ID (XFASTINT (val));
5117              dim = CHARSET_DIMENSION (charset);
5118              while (len < dim)
5119                {
5120                  ONE_MORE_BYTE (c);
5121                  code = (code << 8) | c;
5122                  len++;
5123                }
5124              CODING_DECODE_CHAR (coding, src, src_base, src_end,
5125                                  charset, code, c);
5126            }
5127          else
5128            {
5129              /* VAL is a list of charset IDs.  It is assured that the
5130                 list is sorted by charset dimensions (smaller one
5131                 comes first).  */

At conditional (13): "val & 7 == 5" taking false path

5132              while (CONSP (val))
5133                {
5134                  charset = CHARSET_FROM_ID (XFASTINT (XCAR (val)));
5135                  dim = CHARSET_DIMENSION (charset);
5136                  while (len < dim)
5137                    {
5138                      ONE_MORE_BYTE (c);
5139                      code = (code << 8) | c;
5140                      len++;
5141                    }
5142                  CODING_DECODE_CHAR (coding, src, src_base,
5143                                      src_end, charset, code, c);
5144                  if (c >= 0)
5145                    break;
5146                  val = XCDR (val);
5147                }
5148            }

At conditional (14): "c < 0" taking false path

5149          if (c < 0)
5150            goto invalid_code;

Event uninit_use: Using uninitialized value "charset"
Also see events: [var_decl]

5151          if (charset->id != charset_ascii
5152              && last_id != charset->id)
5153            {
5154              if (last_id != charset_ascii)
5155                ADD_CHARSET_DATA (charbuf, char_offset - last_offset, 
last_id);
5156              last_id = charset->id;
5157              last_offset = char_offset;
5158            }
51




reply via email to

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