public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] libctf: avoid mingw warning
@ 2022-06-21 18:30 Nick Alcock
  0 siblings, 0 replies; only message in thread
From: Nick Alcock @ 2022-06-21 18:30 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3ec2b3c05887bd00a6d4a4e94e004c6d9d2f70eb

commit 3ec2b3c05887bd00a6d4a4e94e004c6d9d2f70eb
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Fri Jun 10 19:06:59 2022 +0100

    libctf: avoid mingw warning
    
    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.

Diff:
---
 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-21 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 18:30 [binutils-gdb] libctf: avoid mingw warning Nick Alcock

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).