Re: format strings in libexpat

2023-02-20 Thread Joerg Sonnenberger
On Sat, Feb 18, 2023 at 08:22:56AM +, Miod Vallat wrote: > libexpat assumes the compiler might not know of the C99 format > specifiers for ptrdiff_t and size_t, and tries to guess alternative > format strings. The problem is the printf runtime. There is no good way to detect the support withou

Re: format strings in libexpat

2023-02-20 Thread Miod Vallat
> Does this actually change something on any of our architectures? This gets rid of warnings such as: /usr/src/lib/libexpat/lib/xmlparse.c: In function 'accountingReportDiff': /usr/src/lib/libexpat/lib/xmlparse.c:7704: warning: format '%6d' expects type 'int', but argument 3 has type 'ptrdiff_t'

Re: format strings in libexpat

2023-02-20 Thread Alexander Bluhm
On Sat, Feb 18, 2023 at 08:22:56AM +, Miod Vallat wrote: > libexpat assumes the compiler might not know of the C99 format > specifiers for ptrdiff_t and size_t, and tries to guess alternative > format strings. > > The following diff relieves it of this misery (but can't be sent > up??tream, as

format strings in libexpat

2023-02-18 Thread Miod Vallat
libexpat assumes the compiler might not know of the C99 format specifiers for ptrdiff_t and size_t, and tries to guess alternative format strings. The following diff relieves it of this misery (but can't be sent upѕtream, as it is too aggressive). Index: lib/internal.h ===