emacs-devel
[Top][All Lists]
Advanced

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

Problem report #124: base/src/emacs/src/term.c (encode_terminal_code); U


From: Dan Nicolaescu
Subject: Problem report #124: base/src/emacs/src/term.c (encode_terminal_code); UNINIT
Date: Tue, 02 Dec 2008 17:01:34 -0800

CID: 124
Checker: UNINIT (help)
File: base/src/emacs/src/term.c
Function: encode_terminal_code
Description: Using uninitialized value "c" in call to function
"char_charset"

Event var_decl: Declared variable "c" without initializer
Also see events: [uninit_use_in_call]

655               int c;
656               Lisp_Object string;
657     
658               string = Qnil;

At conditional (1): "(((src + 0))->u).ch < 256" taking true path
At conditional (2): "0" taking false path

659               SET_GLYPH_FROM_CHAR_GLYPH (g, src[0]);
660     

At conditional (3): "(g).ch < 0" taking false path
At conditional (4): "(g).face_id != 0" taking false path
At conditional (5): "(g).ch >= tlen" taking false path
At conditional (6): "*(tbase + ((g).ch * 8)) & 7 != 3" taking false path

661               if (GLYPH_INVALID_P (g) || GLYPH_SIMPLE_P (tbase, tlen, g))
662                 {
663                   /* This glyph doesn't have an entry in Vglyph_table.  */
664                   c = src->u.ch;
665                 }
666               else
667                 {
668                   /* This glyph has an entry in Vglyph_table,
669                      so process any alias before testing for simpleness.  */

At conditional (7): "(g).face_id == 0" taking true path
At conditional (8): "(g).ch < tlen" taking true path
At conditional (9): "*(tbase + ((g).ch * 8)) & 7 == 0" taking true path
At conditional (10): "(g).face_id == 0" taking true path
At conditional (11): "(g).ch < tlen" taking true path
At conditional (12): "*(tbase + ((g).ch * 8)) & 7 == 0" taking false path
At conditional (13): "(g).ch > 4194303" taking true path
At conditional (14): "0" taking false path

670                   GLYPH_FOLLOW_ALIASES (tbase, tlen, g);
671     

At conditional (15): "(g).face_id != 0" taking false path
At conditional (16): "(g).ch >= tlen" taking false path
At conditional (17): "*(tbase + ((g).ch * 8)) & 7 != 3" taking false path

672                   if (GLYPH_SIMPLE_P (tbase, tlen, g))
673                     /* We set the multi-byte form of a character in G
674                        (that should be an ASCII character) at WORKBUF.  */
675                     c = GLYPH_CHAR (g);
676                   else
677                     /* We have a string in Vglyph_table.  */
678                     string = tbase[GLYPH_CHAR (g)];
679                 }
680     

At conditional (18): "string == Qnil" taking true path

681               if (NILP (string))
682                 {
683                   nbytes = buf - encode_terminal_src;

At conditional (19): "encode_terminal_src_size < (nbytes + 5)" taking true path

684                   if (encode_terminal_src_size < nbytes + 
MAX_MULTIBYTE_LENGTH)
685                     {
686                       encode_terminal_src_size = nbytes + 
MAX_MULTIBYTE_LENGTH;
687                       encode_terminal_src = xrealloc (encode_terminal_src,
688                                                       
encode_terminal_src_size);
689                       buf = encode_terminal_src + nbytes;
690                     }

Event uninit_use_in_call: Using uninitialized value "c" in call to function 
"char_charset" [model]
Also see events: [var_decl]

691                   if (char_charset (c, charset_list, NULL))
692                     {
693                       /* Store the multibyte form of C at BUF.  */
694                       buf += CHAR_STRING (c, buf);
695                       nchars++;
696                     }
697                   else
698                     {
699                       /* C is not encodable.  */
700                       *buf++ = '?';
701                       nchars++;
702                       while (src + 1 < src_end && CHAR_GLYPH_PADDING_P 
(src[1]))
703                         {
704                           *buf++ = '?';
705                           nchars++;
706                           src++;
707                         }
708                     }
7




reply via email to

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