all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: kbrown@cornell.edu
Cc: 32230@debbugs.gnu.org, eggert@cs.ucla.edu
Subject: bug#32230: 27.0.50; GCC 7 warning due to -Wformat-overflow
Date: Sat, 21 Jul 2018 10:26:15 +0300	[thread overview]
Message-ID: <83effxyrqg.fsf@gnu.org> (raw)
In-Reply-To: <83fu0dyt9r.fsf@gnu.org> (message from Eli Zaretskii on Sat, 21 Jul 2018 09:53:04 +0300)

> Date: Sat, 21 Jul 2018 09:53:04 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 32230@debbugs.gnu.org, eggert@cs.ucla.edu
> 
> 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	other threads:[~2018-07-21  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 22:02 bug#32230: 27.0.50; GCC 7 warning due to -Wformat-overflow Ken Brown
2018-07-21  6:53 ` Eli Zaretskii
2018-07-21  7:26   ` Eli Zaretskii [this message]
2018-07-21 12:42     ` Ken Brown
2018-07-21 12:47       ` Eli Zaretskii
2018-07-21 16:26         ` Ken Brown
2018-07-21 16:40           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83effxyrqg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32230@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=kbrown@cornell.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.