aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-06-22 11:15:23 -0700
committerPaul Eggert2011-06-22 11:15:23 -0700
commit85fece3ec2ac88faec0ae3da5417d6e60b10cc63 (patch)
treea6a72b462548f9f78a28d9508299582db361d87b /src
parent94a807ac4e785c6387ddac4380a924a7859ab3f2 (diff)
downloademacs-85fece3ec2ac88faec0ae3da5417d6e60b10cc63.tar.gz
emacs-85fece3ec2ac88faec0ae3da5417d6e60b10cc63.zip
GLYPH_DEBUG fixes
The following patches are for when GLYPH_DEBUG && !XASSERT. * dispextern.h (trace_redisplay_p, dump_glyph_string): * dispnew.c (flush_stdout): * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph): Mark as externally visible. * dispnew.c (check_window_matrix_pointers): Now static. * dispnew.c (window_to_frame_vpos): * xfns.c (unwind_create_frame): * xterm.c (x_check_font): Remove unused local. * scroll.c (CHECK_BOUNDS): * xfaces.c (cache_fache): Rename local to avoid shadowing. * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static. * xdisp.c (check_window_end): Now a no-op if !XASSERTS. (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos) (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos): Now static. (debug_method_add): Use va_list and vsprintf rather than relying on undefined behavior with wrong number of arguments. (dump_glyph, dump_glyph_row, Fdump_glyph_matrix): Don't assume ptrdiff_t and EMACS_INT are the same width as int. In this code, it's OK to assume C99 behavior for ptrdiff_t formats since we're not interested in debugging glyphs with old libraries. * xfaces.c (cache_face): Move debugging code earlier; this pacifies GCC 4.6.0's static checking.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog28
-rw-r--r--src/dispextern.h4
-rw-r--r--src/dispnew.c11
-rw-r--r--src/scroll.c8
-rw-r--r--src/w32fns.c2
-rw-r--r--src/xdisp.c52
-rw-r--r--src/xfaces.c30
-rw-r--r--src/xfns.c4
-rw-r--r--src/xterm.c2
9 files changed, 84 insertions, 57 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 051bcef6cf9..bfed2816d75 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,33 @@
12011-06-22 Paul Eggert <eggert@cs.ucla.edu> 12011-06-22 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 GLYPH_DEBUG fixes
4 The following patches are for when GLYPH_DEBUG && !XASSERT.
5 * dispextern.h (trace_redisplay_p, dump_glyph_string):
6 * dispnew.c (flush_stdout):
7 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
8 Mark as externally visible.
9 * dispnew.c (check_window_matrix_pointers): Now static.
10 * dispnew.c (window_to_frame_vpos):
11 * xfns.c (unwind_create_frame):
12 * xterm.c (x_check_font): Remove unused local.
13 * scroll.c (CHECK_BOUNDS):
14 * xfaces.c (cache_fache): Rename local to avoid shadowing.
15 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
16 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
17 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
18 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
19 Now static.
20 (debug_method_add): Use va_list and vsprintf rather than relying
21 on undefined behavior with wrong number of arguments.
22 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
23 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
24 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
25 since we're not interested in debugging glyphs with old libraries.
26 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
27 GCC 4.6.0's static checking.
28
292011-06-22 Paul Eggert <eggert@cs.ucla.edu>
30
3 Integer overflow and signedness fixes (Bug#8873). 31 Integer overflow and signedness fixes (Bug#8873).
4 A few related buffer overrun fixes, too. 32 A few related buffer overrun fixes, too.
5 33
diff --git a/src/dispextern.h b/src/dispextern.h
index 02f1e5314aa..57fa09d3bfc 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -151,7 +151,7 @@ enum window_part
151 151
152#if GLYPH_DEBUG 152#if GLYPH_DEBUG
153 153
154extern int trace_redisplay_p; 154extern int trace_redisplay_p EXTERNALLY_VISIBLE;
155#include <stdio.h> 155#include <stdio.h>
156 156
157#define TRACE(X) \ 157#define TRACE(X) \
@@ -3010,7 +3010,7 @@ extern EMACS_INT compute_display_string_end (EMACS_INT);
3010#ifdef HAVE_WINDOW_SYSTEM 3010#ifdef HAVE_WINDOW_SYSTEM
3011 3011
3012#if GLYPH_DEBUG 3012#if GLYPH_DEBUG
3013extern void dump_glyph_string (struct glyph_string *); 3013extern void dump_glyph_string (struct glyph_string *) EXTERNALLY_VISIBLE;
3014#endif 3014#endif
3015 3015
3016extern void x_get_glyph_overhangs (struct glyph *, struct frame *, 3016extern void x_get_glyph_overhangs (struct glyph *, struct frame *,
diff --git a/src/dispnew.c b/src/dispnew.c
index dbf052dd099..21df105971b 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -155,7 +155,6 @@ static int update_text_area (struct window *, int);
155static void make_current (struct glyph_matrix *, struct glyph_matrix *, 155static void make_current (struct glyph_matrix *, struct glyph_matrix *,
156 int); 156 int);
157static void mirror_make_current (struct window *, int); 157static void mirror_make_current (struct window *, int);
158void check_window_matrix_pointers (struct window *);
159#if GLYPH_DEBUG 158#if GLYPH_DEBUG
160static void check_matrix_pointers (struct glyph_matrix *, 159static void check_matrix_pointers (struct glyph_matrix *,
161 struct glyph_matrix *); 160 struct glyph_matrix *);
@@ -1478,6 +1477,8 @@ realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim)
1478 stdout. 1477 stdout.
1479*/ 1478*/
1480 1479
1480void flush_stdout (void) EXTERNALLY_VISIBLE;
1481
1481void 1482void
1482flush_stdout (void) 1483flush_stdout (void)
1483{ 1484{
@@ -3052,7 +3053,7 @@ mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy
3052 matrices of leaf window agree with their frame matrices about 3053 matrices of leaf window agree with their frame matrices about
3053 glyph pointers. */ 3054 glyph pointers. */
3054 3055
3055void 3056static void
3056check_window_matrix_pointers (struct window *w) 3057check_window_matrix_pointers (struct window *w)
3057{ 3058{
3058 while (w) 3059 while (w)
@@ -3116,12 +3117,10 @@ check_matrix_pointers (struct glyph_matrix *window_matrix,
3116static int 3117static int
3117window_to_frame_vpos (struct window *w, int vpos) 3118window_to_frame_vpos (struct window *w, int vpos)
3118{ 3119{
3119 struct frame *f = XFRAME (w->frame); 3120 xassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
3120
3121 xassert (!FRAME_WINDOW_P (f));
3122 xassert (vpos >= 0 && vpos <= w->desired_matrix->nrows); 3121 xassert (vpos >= 0 && vpos <= w->desired_matrix->nrows);
3123 vpos += WINDOW_TOP_EDGE_LINE (w); 3122 vpos += WINDOW_TOP_EDGE_LINE (w);
3124 xassert (vpos >= 0 && vpos <= FRAME_LINES (f)); 3123 xassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (w->frame)));
3125 return vpos; 3124 return vpos;
3126} 3125}
3127 3126
diff --git a/src/scroll.c b/src/scroll.c
index ba012874460..6291936a541 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -268,10 +268,10 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
268# define CHECK_BOUNDS \ 268# define CHECK_BOUNDS \
269 do \ 269 do \
270 { \ 270 { \
271 int k; \ 271 int ck; \
272 for (k = 0; k < window_size; ++k) \ 272 for (ck = 0; ck < window_size; ++ck) \
273 xassert (copy_from[k] == -1 \ 273 xassert (copy_from[ck] == -1 \
274 || (copy_from[k] >= 0 && copy_from[k] < window_size)); \ 274 || (copy_from[ck] >= 0 && copy_from[ck] < window_size)); \
275 } \ 275 } \
276 while (0); 276 while (0);
277#endif 277#endif
diff --git a/src/w32fns.c b/src/w32fns.c
index 823dbe3567e..e4b11b70441 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -184,7 +184,7 @@ unsigned int msh_mousewheel = 0;
184static unsigned menu_free_timer = 0; 184static unsigned menu_free_timer = 0;
185 185
186#if GLYPH_DEBUG 186#if GLYPH_DEBUG
187int image_cache_refcount, dpyinfo_refcount; 187static int image_cache_refcount, dpyinfo_refcount;
188#endif 188#endif
189 189
190static HWND w32_visible_system_caret_hwnd; 190static HWND w32_visible_system_caret_hwnd;
diff --git a/src/xdisp.c b/src/xdisp.c
index d04ceddacb2..f0b219702f6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2242,7 +2242,7 @@ check_it (it)
2242#endif /* not 0 */ 2242#endif /* not 0 */
2243 2243
2244 2244
2245#if GLYPH_DEBUG 2245#if GLYPH_DEBUG && XASSERTS
2246 2246
2247/* Check that the window end of window W is what we expect it 2247/* Check that the window end of window W is what we expect it
2248 to be---the last row in the current matrix displaying text. */ 2248 to be---the last row in the current matrix displaying text. */
@@ -2264,11 +2264,11 @@ check_window_end (struct window *w)
2264 2264
2265#define CHECK_WINDOW_END(W) check_window_end ((W)) 2265#define CHECK_WINDOW_END(W) check_window_end ((W))
2266 2266
2267#else /* not GLYPH_DEBUG */ 2267#else
2268 2268
2269#define CHECK_WINDOW_END(W) (void) 0 2269#define CHECK_WINDOW_END(W) (void) 0
2270 2270
2271#endif /* not GLYPH_DEBUG */ 2271#endif
2272 2272
2273 2273
2274 2274
@@ -11101,40 +11101,42 @@ hscroll_windows (Lisp_Object window)
11101 11101
11102/* First and last unchanged row for try_window_id. */ 11102/* First and last unchanged row for try_window_id. */
11103 11103
11104int debug_first_unchanged_at_end_vpos; 11104static int debug_first_unchanged_at_end_vpos;
11105int debug_last_unchanged_at_beg_vpos; 11105static int debug_last_unchanged_at_beg_vpos;
11106 11106
11107/* Delta vpos and y. */ 11107/* Delta vpos and y. */
11108 11108
11109int debug_dvpos, debug_dy; 11109static int debug_dvpos, debug_dy;
11110 11110
11111/* Delta in characters and bytes for try_window_id. */ 11111/* Delta in characters and bytes for try_window_id. */
11112 11112
11113EMACS_INT debug_delta, debug_delta_bytes; 11113static EMACS_INT debug_delta, debug_delta_bytes;
11114 11114
11115/* Values of window_end_pos and window_end_vpos at the end of 11115/* Values of window_end_pos and window_end_vpos at the end of
11116 try_window_id. */ 11116 try_window_id. */
11117 11117
11118EMACS_INT debug_end_vpos; 11118static EMACS_INT debug_end_vpos;
11119 11119
11120/* Append a string to W->desired_matrix->method. FMT is a printf 11120/* Append a string to W->desired_matrix->method. FMT is a printf
11121 format string. A1...A9 are a supplement for a variable-length 11121 format string. If trace_redisplay_p is non-zero also printf the
11122 argument list. If trace_redisplay_p is non-zero also printf the
11123 resulting string to stderr. */ 11122 resulting string to stderr. */
11124 11123
11124static void debug_method_add (struct window *, char const *, ...)
11125 ATTRIBUTE_FORMAT_PRINTF (2, 3);
11126
11125static void 11127static void
11126debug_method_add (w, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9) 11128debug_method_add (struct window *w, char const *fmt, ...)
11127 struct window *w;
11128 char *fmt;
11129 int a1, a2, a3, a4, a5, a6, a7, a8, a9;
11130{ 11129{
11131 char buffer[512]; 11130 char buffer[512];
11132 char *method = w->desired_matrix->method; 11131 char *method = w->desired_matrix->method;
11133 int len = strlen (method); 11132 int len = strlen (method);
11134 int size = sizeof w->desired_matrix->method; 11133 int size = sizeof w->desired_matrix->method;
11135 int remaining = size - len - 1; 11134 int remaining = size - len - 1;
11135 va_list ap;
11136 11136
11137 sprintf (buffer, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9); 11137 va_start (ap, fmt);
11138 vsprintf (buffer, fmt, ap);
11139 va_end (ap);
11138 if (len && remaining) 11140 if (len && remaining)
11139 { 11141 {
11140 method[len] = '|'; 11142 method[len] = '|';
@@ -16265,9 +16267,9 @@ try_window_id (struct window *w)
16265 16267
16266#if GLYPH_DEBUG 16268#if GLYPH_DEBUG
16267 16269
16268void dump_glyph_row (struct glyph_row *, int, int); 16270void dump_glyph_row (struct glyph_row *, int, int) EXTERNALLY_VISIBLE;
16269void dump_glyph_matrix (struct glyph_matrix *, int); 16271void dump_glyph_matrix (struct glyph_matrix *, int) EXTERNALLY_VISIBLE;
16270void dump_glyph (struct glyph_row *, struct glyph *, int); 16272void dump_glyph (struct glyph_row *, struct glyph *, int) EXTERNALLY_VISIBLE;
16271 16273
16272 16274
16273/* Dump the contents of glyph matrix MATRIX on stderr. 16275/* Dump the contents of glyph matrix MATRIX on stderr.
@@ -16294,7 +16296,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
16294 if (glyph->type == CHAR_GLYPH) 16296 if (glyph->type == CHAR_GLYPH)
16295 { 16297 {
16296 fprintf (stderr, 16298 fprintf (stderr,
16297 " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", 16299 " %5td %4c %6"pI"d %c %3d 0x%05x %c %4d %1.1d%1.1d\n",
16298 glyph - row->glyphs[TEXT_AREA], 16300 glyph - row->glyphs[TEXT_AREA],
16299 'C', 16301 'C',
16300 glyph->charpos, 16302 glyph->charpos,
@@ -16315,7 +16317,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
16315 else if (glyph->type == STRETCH_GLYPH) 16317 else if (glyph->type == STRETCH_GLYPH)
16316 { 16318 {
16317 fprintf (stderr, 16319 fprintf (stderr,
16318 " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", 16320 " %5td %4c %6"pI"d %c %3d 0x%05x %c %4d %1.1d%1.1d\n",
16319 glyph - row->glyphs[TEXT_AREA], 16321 glyph - row->glyphs[TEXT_AREA],
16320 'S', 16322 'S',
16321 glyph->charpos, 16323 glyph->charpos,
@@ -16334,7 +16336,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
16334 else if (glyph->type == IMAGE_GLYPH) 16336 else if (glyph->type == IMAGE_GLYPH)
16335 { 16337 {
16336 fprintf (stderr, 16338 fprintf (stderr,
16337 " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", 16339 " %5td %4c %6"pI"d %c %3d 0x%05x %c %4d %1.1d%1.1d\n",
16338 glyph - row->glyphs[TEXT_AREA], 16340 glyph - row->glyphs[TEXT_AREA],
16339 'I', 16341 'I',
16340 glyph->charpos, 16342 glyph->charpos,
@@ -16353,7 +16355,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
16353 else if (glyph->type == COMPOSITE_GLYPH) 16355 else if (glyph->type == COMPOSITE_GLYPH)
16354 { 16356 {
16355 fprintf (stderr, 16357 fprintf (stderr,
16356 " %5d %4c %6d %c %3d 0x%05x", 16358 " %5td %4c %6"pI"d %c %3d 0x%05x",
16357 glyph - row->glyphs[TEXT_AREA], 16359 glyph - row->glyphs[TEXT_AREA],
16358 '+', 16360 '+',
16359 glyph->charpos, 16361 glyph->charpos,
@@ -16389,7 +16391,7 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
16389 fprintf (stderr, "Row Start End Used oE><\\CTZFesm X Y W H V A P\n"); 16391 fprintf (stderr, "Row Start End Used oE><\\CTZFesm X Y W H V A P\n");
16390 fprintf (stderr, "======================================================================\n"); 16392 fprintf (stderr, "======================================================================\n");
16391 16393
16392 fprintf (stderr, "%3d %5d %5d %4d %1.1d%1.1d%1.1d%1.1d\ 16394 fprintf (stderr, "%3d %5"pI"d %5"pI"d %4d %1.1d%1.1d%1.1d%1.1d\
16393%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n", 16395%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n",
16394 vpos, 16396 vpos,
16395 MATRIX_ROW_START_CHARPOS (row), 16397 MATRIX_ROW_START_CHARPOS (row),
@@ -16417,7 +16419,7 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
16417 fprintf (stderr, "%9d %5d\t%5d\n", row->start.overlay_string_index, 16419 fprintf (stderr, "%9d %5d\t%5d\n", row->start.overlay_string_index,
16418 row->end.overlay_string_index, 16420 row->end.overlay_string_index,
16419 row->continuation_lines_width); 16421 row->continuation_lines_width);
16420 fprintf (stderr, "%9d %5d\n", 16422 fprintf (stderr, "%9"pI"d %5"pI"d\n",
16421 CHARPOS (row->start.string_pos), 16423 CHARPOS (row->start.string_pos),
16422 CHARPOS (row->end.string_pos)); 16424 CHARPOS (row->end.string_pos));
16423 fprintf (stderr, "%9d %5d\n", row->start.dpvec_index, 16425 fprintf (stderr, "%9d %5d\n", row->start.dpvec_index,
@@ -16482,7 +16484,7 @@ glyphs in short form, otherwise show glyphs in long form. */)
16482 struct window *w = XWINDOW (selected_window); 16484 struct window *w = XWINDOW (selected_window);
16483 struct buffer *buffer = XBUFFER (w->buffer); 16485 struct buffer *buffer = XBUFFER (w->buffer);
16484 16486
16485 fprintf (stderr, "PT = %d, BEGV = %d. ZV = %d\n", 16487 fprintf (stderr, "PT = %"pI"d, BEGV = %"pI"d. ZV = %"pI"d\n",
16486 BUF_PT (buffer), BUF_BEGV (buffer), BUF_ZV (buffer)); 16488 BUF_PT (buffer), BUF_BEGV (buffer), BUF_ZV (buffer));
16487 fprintf (stderr, "Cursor x = %d, y = %d, hpos = %d, vpos = %d\n", 16489 fprintf (stderr, "Cursor x = %d, y = %d, hpos = %d, vpos = %d\n",
16488 w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos); 16490 w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos);
diff --git a/src/xfaces.c b/src/xfaces.c
index 99c35fbb120..5833633c2e7 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4380,6 +4380,21 @@ cache_face (struct face_cache *c, struct face *face, unsigned int hash)
4380 break; 4380 break;
4381 face->id = i; 4381 face->id = i;
4382 4382
4383#if GLYPH_DEBUG
4384 /* Check that FACE got a unique id. */
4385 {
4386 int j, n;
4387 struct face *face1;
4388
4389 for (j = n = 0; j < FACE_CACHE_BUCKETS_SIZE; ++j)
4390 for (face1 = c->buckets[j]; face1; face1 = face1->next)
4391 if (face1->id == i)
4392 ++n;
4393
4394 xassert (n == 1);
4395 }
4396#endif /* GLYPH_DEBUG */
4397
4383 /* Maybe enlarge C->faces_by_id. */ 4398 /* Maybe enlarge C->faces_by_id. */
4384 if (i == c->used) 4399 if (i == c->used)
4385 { 4400 {
@@ -4396,21 +4411,6 @@ cache_face (struct face_cache *c, struct face *face, unsigned int hash)
4396 c->used++; 4411 c->used++;
4397 } 4412 }
4398 4413
4399#if GLYPH_DEBUG
4400 /* Check that FACE got a unique id. */
4401 {
4402 int j, n;
4403 struct face *face;
4404
4405 for (j = n = 0; j < FACE_CACHE_BUCKETS_SIZE; ++j)
4406 for (face = c->buckets[j]; face; face = face->next)
4407 if (face->id == i)
4408 ++n;
4409
4410 xassert (n == 1);
4411 }
4412#endif /* GLYPH_DEBUG */
4413
4414 c->faces_by_id[i] = face; 4414 c->faces_by_id[i] = face;
4415} 4415}
4416 4416
diff --git a/src/xfns.c b/src/xfns.c
index e98e287f50b..2b2ecf93739 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -145,7 +145,7 @@ static Lisp_Object Qcompound_text, Qcancel_timer;
145Lisp_Object Qfont_param; 145Lisp_Object Qfont_param;
146 146
147#if GLYPH_DEBUG 147#if GLYPH_DEBUG
148int image_cache_refcount, dpyinfo_refcount; 148static int image_cache_refcount, dpyinfo_refcount;
149#endif 149#endif
150 150
151#if defined (USE_GTK) && defined (HAVE_FREETYPE) 151#if defined (USE_GTK) && defined (HAVE_FREETYPE)
@@ -2927,7 +2927,7 @@ unwind_create_frame (Lisp_Object frame)
2927 /* If frame is ``official'', nothing to do. */ 2927 /* If frame is ``official'', nothing to do. */
2928 if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame)) 2928 if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame))
2929 { 2929 {
2930#if GLYPH_DEBUG 2930#if GLYPH_DEBUG && XASSERTS
2931 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 2931 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
2932#endif 2932#endif
2933 2933
diff --git a/src/xterm.c b/src/xterm.c
index 32fbab55008..bc7592795c4 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9673,8 +9673,6 @@ x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
9673static void 9673static void
9674x_check_font (struct frame *f, struct font *font) 9674x_check_font (struct frame *f, struct font *font)
9675{ 9675{
9676 Lisp_Object frame;
9677
9678 xassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX])); 9676 xassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX]));
9679 if (font->driver->check) 9677 if (font->driver->check)
9680 xassert (font->driver->check (f, font) == 0); 9678 xassert (font->driver->check (f, font) == 0);