libctf: avoid mingw warning
authorNick Alcock <nick.alcock@oracle.com>
Fri, 10 Jun 2022 18:06:59 +0000 (19:06 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 21 Jun 2022 18:27:15 +0000 (19:27 +0100)
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

index c6b8b495568ea176b9e5c6ed27f5cbb9be42285d..ecbc61783f2687261216f80208421c1ac8525365 100644 (file)
@@ -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);