Skip to content

Commit 504f8e5

Browse files
committed
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.
1 parent e44b56d commit 504f8e5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/intervals.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,7 +2334,6 @@ set_intervals_multibyte_1 (INTERVAL i, bool multi_flag,
23342334

23352335
if (multi_flag)
23362336
{
2337-
ptrdiff_t temp;
23382337
left_end_byte
23392338
= advance_to_char_boundary (start_byte + LEFT_TOTAL_LENGTH (i));
23402339
left_end = BYTE_TO_CHAR (left_end_byte);
@@ -2355,8 +2354,6 @@ set_intervals_multibyte_1 (INTERVAL i, bool multi_flag,
23552354

23562355
if (multi_flag)
23572356
{
2358-
ptrdiff_t temp;
2359-
23602357
right_start_byte
23612358
= advance_to_char_boundary (end_byte - RIGHT_TOTAL_LENGTH (i));
23622359
right_start = BYTE_TO_CHAR (right_start_byte);

src/xdisp.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24026,7 +24026,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
2402624026
? string_byte_to_char (elt, bytepos)
2402724027
: bytepos);
2402824028
spec = decode_mode_spec (it->w, c, field, &string);
24029-
multibyte = STRINGP (string) && STRING_MULTIBYTE (string);
24029+
multibyte = !NILP (string) && STRING_MULTIBYTE (string);
2403024030

2403124031
switch (mode_line_target)
2403224032
{
@@ -24702,8 +24702,9 @@ percent99 (ptrdiff_t n, ptrdiff_t d)
2470224702

2470324703
/* Return a string for the output of a mode line %-spec for window W,
2470424704
generated by character C. FIELD_WIDTH > 0 means pad the string
24705-
returned with spaces to that value. Return a Lisp string in
24706-
*STRING if the resulting string is taken from that Lisp string.
24705+
returned with spaces to that value. Set *STRING to be a Lisp
24706+
string if the resulting string is taken from that Lisp string;
24707+
otherwise, set *STRING to Qnil.
2470724708

2470824709
Note we operate on the current buffer for most purposes. */
2470924710

0 commit comments

Comments
 (0)