From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Problem report #124: base/src/emacs/src/term.c (encode_terminal_code); UNINIT Date: Tue, 02 Dec 2008 17:01:34 -0800 Message-ID: <200812030120.mB31KFvn022805@mothra.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228267567 1815 80.91.229.12 (3 Dec 2008 01:26:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 01:26:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 03 02:27:10 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7gW0-00048r-S0 for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 02:26:57 +0100 Original-Received: from localhost ([127.0.0.1]:35147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7gUq-000768-Ga for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2008 20:25:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7gPr-0003MP-Vu for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:20:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7gPr-0003LR-6Z for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:20:35 -0500 Original-Received: from [199.232.76.173] (port=37581 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7gPq-0003LI-Ou for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:20:34 -0500 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:34547) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1L7gPo-0008WL-ST for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:20:33 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mB31KGmB026962 for ; Tue, 2 Dec 2008 17:20:16 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mB31KFvn022805; Tue, 2 Dec 2008 17:20:15 -0800 (PST) Original-Lines: 100 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mB31KGmB026962 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106474 Archived-At: 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