This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use CHAR_BIT instead of NBBY in libctf

>>>>> "Nick" == Nick Alcock <> writes:

>> ../../binutils-gdb/libctf/ctf-create.c: In function 'ctf_add_type':
>> ../../binutils-gdb/libctf/ctf-create.c:1822:16: warning: unknown conversion type character 'z' in format [-Wformat=]
>> ctf_dprintf ("Conflict for type %s against ID %lx: "
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Nick> I suppose we could explicitly cast size_t arguments instead of using
Nick> %zi. I can implement that if you think it's sensible. (Ironically, it's
Nick> not that long ago that I ripped those casts out and moved to %zi
Nick> everywhere...)

FWIW I am not sure if this is really an ongoing problem or whether it's
gcc being conservative.  However, apparently at least some versions of
Windows don't support %z.

BFD defines various BFD_PRI* macros that you can use if you want to try
for the full approach.  I suppose this could be extended to cover "%z".

Casting is fine with me, though of course it can fail if there is
overflow, so some thought is required.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]