bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32230: 27.0.50; GCC 7 warning due to -Wformat-overflow


From: Eli Zaretskii
Subject: bug#32230: 27.0.50; GCC 7 warning due to -Wformat-overflow
Date: Sat, 21 Jul 2018 10:26:15 +0300

> Date: Sat, 21 Jul 2018 09:53:04 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
> 
> But do you understand why it says "between 5 and 8 bytes"?  The
> corresponding argument to snprintf is either 4 or 6, so it should be
> between 5 and 7.  Where could the extra byte come from?  Is that
> because glyphless.ch is a 25-bit field?

I meant sprintf, of course.  And if the above is the reason, then
perhaps using something like

  (unsigned int) glyph->u.glyphless.ch & 0xffffff

is a cleaner solution (assuming it shuts up the warning)?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]