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 #108: base/src/emacs/src/font.c (font_unparse_fcname); UNINIT Date: Tue, 2 Dec 2008 14:16:29 -0800 (PST) Message-ID: <200812022216.mB2MGTLb021743@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 1228256222 2094 80.91.229.12 (2 Dec 2008 22:17:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2008 22:17:02 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 02 23:18:05 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 1L7dZ5-0003lO-G8 for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2008 23:17:55 +0100 Original-Received: from localhost ([127.0.0.1]:45872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7dXv-0003l2-4s for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2008 17:16:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7dXp-0003jd-Q3 for emacs-devel@gnu.org; Tue, 02 Dec 2008 17:16:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7dXo-0003j1-Ni for emacs-devel@gnu.org; Tue, 02 Dec 2008 17:16:36 -0500 Original-Received: from [199.232.76.173] (port=50339 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7dXo-0003im-AY for emacs-devel@gnu.org; Tue, 02 Dec 2008 17:16:36 -0500 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:43524) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1L7dXn-0000oC-PT for emacs-devel@gnu.org; Tue, 02 Dec 2008 17:16:36 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mB2MGTS9017806 for ; Tue, 2 Dec 2008 14:16:29 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mB2MGTLb021743; Tue, 2 Dec 2008 14:16:29 -0800 (PST) Original-Lines: 112 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mB2MGTS9017806 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:106443 Archived-At: CID: 108 Checker: UNINIT (help) File: base/src/emacs/src/font.c Function: font_unparse_fcname Description: Using uninitialized value "dpi" as argument to function "sprintf" Event var_decl: Declared variable "dpi" without initializer Also see events: [uninit_arg] 1604 int dpi; 1605 int i, len = 1; 1606 char *p; 1607 Lisp_Object styles[3]; 1608 char *style_names[3] = { "weight", "slant", "width" }; 1609 char work[256]; 1610 1611 family = AREF (font, FONT_FAMILY_INDEX); At conditional (1): "family != Qnil" taking true path 1612 if (! NILP (family)) 1613 { At conditional (2): "family & 7 == 1" taking true path 1614 if (SYMBOLP (family)) 1615 { 1616 family = SYMBOL_NAME (family); At conditional (3): "((0), (family & -8))->size_byte < 0" taking true path 1617 len += SBYTES (family); 1618 } 1619 else 1620 family = Qnil; 1621 } 1622 1623 val = AREF (font, FONT_SIZE_INDEX); At conditional (4): "val & 7 == 0" taking true path 1624 if (INTEGERP (val)) 1625 { At conditional (5): "val >> 3 != 0" taking true path 1626 if (XINT (val) != 0) 1627 pixel_size = XINT (val); 1628 point_size = -1; 1629 len += 21; /* for ":pixelsize=NUM" */ 1630 } 1631 else if (FLOATP (val)) 1632 { 1633 pixel_size = -1; 1634 point_size = (int) XFLOAT_DATA (val); 1635 len += 11; /* for "-NUM" */ 1636 } 1637 1638 foundry = AREF (font, FONT_FOUNDRY_INDEX); At conditional (6): "foundry != Qnil" taking true path 1639 if (! NILP (foundry)) 1640 { At conditional (7): "foundry & 7 == 1" taking true path 1641 if (SYMBOLP (foundry)) 1642 { 1643 foundry = SYMBOL_NAME (foundry); At conditional (8): "((0), (foundry & -8))->size_byte < 0" taking true path 1644 len += 9 + SBYTES (foundry); /* ":foundry=NAME" */ 1645 } 1646 else 1647 foundry = Qnil; 1648 } 1649 At conditional (9): "i < 3" taking true path At conditional (11): "i < 3" taking true path At conditional (13): "i < 3" taking true path At conditional (15): "i < 3" taking false path 1650 for (i = 0; i < 3; i++) 1651 { 1652 styles[i] = font_style_symbolic (font, FONT_WEIGHT_INDEX + i, 0); At conditional (10): "styles[i] != Qnil" taking true path At conditional (12): "styles[i] != Qnil" taking true path At conditional (14): "styles[i] != Qnil" taking true path 1653 if (! NILP (styles[i])) 1654 len += sprintf (work, ":%s=%s", style_names[i], 1655 SDATA (SYMBOL_NAME (styles[i]))); 1656 } 1657 At conditional (16): "((0), (font & -8))->contents[9] & 7 == 0" taking true path 1658 if (INTEGERP (AREF (font, FONT_DPI_INDEX))) Event uninit_arg: Using uninitialized value "dpi" as argument to function "sprintf" Also see events: [var_decl] 1659 len += sprintf (work, ":dpi=%d", dpi); 1660 if (INTEGERP (AREF (font, FONT_SPACING_INDEX))) 1661 len += strlen (":spacing=100"); 1662 if (INTEGERP (AREF (font, FONT_AVGWIDTH_INDEX))) 1663 len += strlen (":scalable=false"); /* or ":scalable=true" */