Commit dba65498 authored by Paul Eggert's avatar Paul Eggert
Browse files

* xdisp.c (display_line): Mark variables that gcc -Wuninitialized cannot

deduce are never used uninitialized.
* lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c
which in turn is copied from coreutils.
parent 9f36b9fd
......@@ -4,6 +4,10 @@
Add a FIXME comment, since the code still doesn't look right.
(Fcurrent_bidi_paragraph_direction): Simplify slightly; this
avoids a gcc -Wuninitialized diagnostic.
(display_line): Mark variables that gcc -Wuninitialized cannot
deduce are never used uninitialized.
* lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c
which in turn is copied from coreutils.
 
current_column: Now returns EMACS_INT, fixing some iftc.
* bytecode.c (Fbyte_code): Don't cast current_column () to int.
......@@ -3524,6 +3524,13 @@ extern void init_system_name (void);
&& (circular_list_error ((list)), 1))) \
: 0)))
/* Use this to suppress gcc's `...may be used before initialized' warnings. */
#ifdef lint
# define IF_LINT(Code) Code
#else
# define IF_LINT(Code) /* empty */
#endif
/* The ubiquitous min and max macros. */
#ifdef max
......
......@@ -17231,14 +17231,16 @@ display_line (struct it *it)
struct glyph_row *row = it->glyph_row;
Lisp_Object overlay_arrow_string;
struct it wrap_it;
int may_wrap = 0, wrap_x;
int wrap_row_used = -1, wrap_row_ascent, wrap_row_height;
int wrap_row_phys_ascent, wrap_row_phys_height;
int wrap_row_extra_line_spacing;
EMACS_INT wrap_row_min_pos, wrap_row_min_bpos;
EMACS_INT wrap_row_max_pos, wrap_row_max_bpos;
int may_wrap = 0, wrap_x IF_LINT (= 0);
int wrap_row_used = -1;
int wrap_row_ascent IF_LINT (= 0), wrap_row_height IF_LINT (= 0);
int wrap_row_phys_ascent IF_LINT (= 0), wrap_row_phys_height IF_LINT (= 0);
int wrap_row_extra_line_spacing IF_LINT (= 0);
EMACS_INT wrap_row_min_pos IF_LINT (= 0), wrap_row_min_bpos IF_LINT (= 0);
EMACS_INT wrap_row_max_pos IF_LINT (= 0), wrap_row_max_bpos IF_LINT (= 0);
int cvpos;
EMACS_INT min_pos = ZV + 1, min_bpos, max_pos = 0, max_bpos;
EMACS_INT min_pos = ZV + 1, max_pos = 0;
EMACS_INT min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0);
 
/* We always start displaying at hpos zero even if hscrolled. */
xassert (it->hpos == 0 && it->current_x == 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment