unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: Problem report #108: base/src/emacs/src/font.c (font_unparse_fcname); UNINIT
Date: Tue, 2 Dec 2008 14:16:29 -0800 (PST)	[thread overview]
Message-ID: <200812022216.mB2MGTLb021743@mothra.ics.uci.edu> (raw)

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" */




             reply	other threads:[~2008-12-02 22:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-02 22:16 Dan Nicolaescu [this message]
2008-12-02 22:47 ` Problem report #108: base/src/emacs/src/font.c (font_unparse_fcname); UNINIT Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812022216.mB2MGTLb021743@mothra.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).