From: Paul Eggert <eggert@cs.ucla.edu>
To: 8512@debbugs.gnu.org
Subject: bug#8512: possibly uninitialized variable in x_produce_glyphs
Date: Sat, 16 Apr 2011 12:40:36 -0700 [thread overview]
Message-ID: <4DA9F0B4.1090204@cs.ucla.edu> (raw)
In the Emacs trunk, GCC 3.4.3 on Solaris 10 warns about a possibly uninitialized
variable in x_produce_glyphs, and it's not clear to me that this diagnostic is
wrong. The function assumes that cmp->glyph_len > 0, but a quick look through the
rest of Emacs suggests that it's possible that it's zero. To play it safe
until someone with more expertise about glyphs can look at the problem, I plan
to install this patch:
--- src/xdisp.c 2011-04-16 01:54:37 +0000
+++ src/xdisp.c 2011-04-16 19:24:11 +0000
@@ -22712,7 +22712,7 @@ x_produce_glyphs (struct it *it)
int lbearing, rbearing;
int i, width, ascent, descent;
int left_padded = 0, right_padded = 0;
- int c;
+ int c = 0; /* FIXME: Is 0 right here, when cmp->glyph_len == 0? */
XChar2b char2b;
struct font_metrics *pcm;
int font_not_found_p;
next reply other threads:[~2011-04-16 19:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-16 19:40 Paul Eggert [this message]
2011-04-16 21:24 ` bug#8512: possibly uninitialized variable in x_produce_glyphs Eli Zaretskii
2011-04-16 22:49 ` Paul Eggert
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA9F0B4.1090204@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=8512@debbugs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.