GNU bug report logs -
#8512
possibly uninitialized variable in x_produce_glyphs
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Sat, 16 Apr 2011 19:42:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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;
This bug report was last modified 14 years and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.