public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: binutils@sourceware.org
Subject: [PATCH 2/3] libctf: avoid mingw warning
Date: Wed, 15 Jun 2022 10:42:12 +0100	[thread overview]
Message-ID: <20220615094213.121312-2-nick.alcock@oracle.com> (raw)
In-Reply-To: <20220615094213.121312-1-nick.alcock@oracle.com>

A missing paren led to an intended cast to avoid dependence on the size
of size_t in one argument of ctf_err_warn applying to the wrong type by
mistake.

libctf/ChangeLog:

	* ctf-serialize.c (ctf_write_mem): Fix cast.
---
 libctf/ctf-serialize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libctf/ctf-serialize.c b/libctf/ctf-serialize.c
index c6b8b495568..ecbc61783f2 100644
--- a/libctf/ctf-serialize.c
+++ b/libctf/ctf-serialize.c
@@ -1319,7 +1319,7 @@ ctf_write_mem (ctf_dict_t *fp, size_t *size, size_t threshold)
 	{
 	  ctf_set_errno (fp, ENOMEM);
 	  ctf_err_warn (fp, 0, 0, _("ctf_write_mem: cannot allocate %li bytes"),
-			(unsigned long) fp->ctf_size + sizeof (struct ctf_header));
+			(unsigned long) (fp->ctf_size + sizeof (struct ctf_header)));
 	  return NULL;
 	}
       ctf_flip_header (hp);
-- 
2.36.1.263.g194b774378.dirty


  reply	other threads:[~2022-06-15  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15  9:42 [PATCH 1/3] libctf: fix linking together multiple objects derived from the same source Nick Alcock
2022-06-15  9:42 ` Nick Alcock [this message]
2022-06-15  9:42 ` [PATCH 3/3] libctf: tests: prune warnings from compiler output Nick Alcock

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=20220615094213.121312-2-nick.alcock@oracle.com \
    --to=nick.alcock@oracle.com \
    --cc=binutils@sourceware.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).