Subject: | Wrong format specifier causes two warnings |
This is with clang on darwin, but most likely also happens with gcc
-Wformat.
Socket.xs:919:16: warning: format specifies type 'int' but the argument
has type 'STRLEN' (aka 'unsigned long') [-Wformat]
" got %d, should be 4", addrlen);
~^ ~~~~~~~
%ld
Socket.xs:925:16: warning: format specifies type 'int' but the argument
has type 'STRLEN' (aka 'unsigned long') [-Wformat]
" got %d, should be 16", addrlen);
~^ ~~~~~~~
%ld
There is a similar piece of code in inet_ntoa() from which you can steal
to silence these warnings.
Vincent
Subject: | warn.txt |
Socket.xs:919:16: warning: format specifies type 'int' but the argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
" got %d, should be 4", addrlen);
~^ ~~~~~~~
%ld
Socket.xs:925:16: warning: format specifies type 'int' but the argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
" got %d, should be 16", addrlen);
~^ ~~~~~~~
%ld