Commit 504f8e55 authored by Paul Eggert's avatar Paul Eggert

Pacify GCC 9.1

* src/intervals.c (set_intervals_multibyte_1): Omit unused temps.
* src/xdisp.c (display_mode_element): Use !NILP instead of
STRINGP.  This convinces GCC we’re not dereferencing a
possibly-null pointer, and should be a bit faster anyway.
parent e44b56d1
Pipeline #1602 failed with stage
in 52 minutes and 34 seconds
...@@ -2334,7 +2334,6 @@ set_intervals_multibyte_1 (INTERVAL i, bool multi_flag, ...@@ -2334,7 +2334,6 @@ set_intervals_multibyte_1 (INTERVAL i, bool multi_flag,
if (multi_flag) if (multi_flag)
{ {
ptrdiff_t temp;
left_end_byte left_end_byte
= advance_to_char_boundary (start_byte + LEFT_TOTAL_LENGTH (i)); = advance_to_char_boundary (start_byte + LEFT_TOTAL_LENGTH (i));
left_end = BYTE_TO_CHAR (left_end_byte); left_end = BYTE_TO_CHAR (left_end_byte);
...@@ -2355,8 +2354,6 @@ set_intervals_multibyte_1 (INTERVAL i, bool multi_flag, ...@@ -2355,8 +2354,6 @@ set_intervals_multibyte_1 (INTERVAL i, bool multi_flag,
if (multi_flag) if (multi_flag)
{ {
ptrdiff_t temp;
right_start_byte right_start_byte
= advance_to_char_boundary (end_byte - RIGHT_TOTAL_LENGTH (i)); = advance_to_char_boundary (end_byte - RIGHT_TOTAL_LENGTH (i));
right_start = BYTE_TO_CHAR (right_start_byte); right_start = BYTE_TO_CHAR (right_start_byte);
......
...@@ -24026,7 +24026,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, ...@@ -24026,7 +24026,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
? string_byte_to_char (elt, bytepos) ? string_byte_to_char (elt, bytepos)
: bytepos); : bytepos);
spec = decode_mode_spec (it->w, c, field, &string); spec = decode_mode_spec (it->w, c, field, &string);
multibyte = STRINGP (string) && STRING_MULTIBYTE (string); multibyte = !NILP (string) && STRING_MULTIBYTE (string);
switch (mode_line_target) switch (mode_line_target)
{ {
...@@ -24702,8 +24702,9 @@ percent99 (ptrdiff_t n, ptrdiff_t d) ...@@ -24702,8 +24702,9 @@ percent99 (ptrdiff_t n, ptrdiff_t d)
/* Return a string for the output of a mode line %-spec for window W, /* Return a string for the output of a mode line %-spec for window W,
generated by character C. FIELD_WIDTH > 0 means pad the string generated by character C. FIELD_WIDTH > 0 means pad the string
returned with spaces to that value. Return a Lisp string in returned with spaces to that value. Set *STRING to be a Lisp
*STRING if the resulting string is taken from that Lisp string. string if the resulting string is taken from that Lisp string;
otherwise, set *STRING to Qnil.
Note we operate on the current buffer for most purposes. */ Note we operate on the current buffer for most purposes. */
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