1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-07 14:31:41 -08:00

Fix more compilation warnings in xdisp.c

* src/xdisp.c (display_mode_element, decode_mode_spec_coding):
Avoid compilation warnings.
This commit is contained in:
Eli Zaretskii 2020-08-23 22:09:39 +03:00
parent f3e6dd1ce9
commit 2c389455c7

View file

@ -25640,7 +25640,8 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
/* Non-ASCII characters in SPEC should cause mode-line
element be displayed as a multibyte string. */
ptrdiff_t nbytes = strlen (spec);
if (multibyte_chars_in_text (spec, nbytes) != nbytes)
if (multibyte_chars_in_text ((const unsigned char *)spec,
nbytes) != nbytes)
multibyte = true;
switch (mode_line_target)
@ -26261,7 +26262,8 @@ decode_mode_spec_coding (Lisp_Object coding_system, char *buf, bool eol_flag)
eolvalue = AREF (val, 2);
if (multibyte)
buf += CHAR_STRING (XFIXNAT (CODING_ATTR_MNEMONIC (attrs)), buf);
buf += CHAR_STRING (XFIXNAT (CODING_ATTR_MNEMONIC (attrs)),
(unsigned char *) buf);
else
*buf++ = ' ';