Ian Jackson <[EMAIL PROTECTED]> writes:
> Frank Lichtenheld writes ("[SCM] dpkg's main repository branch,
> parsechangelog, updated. 1.14.12-36-g2d2cda5"):
>> Summary of changes:
> ...
>> dpkg-deb/info.c | 2 +-
> ...
>> + 2007-12-04 Frank Lichtenheld <[EMAIL PROTECTED]>
>> +
>> + * dpkg-deb/info.c (info_spew): Replace a
>> + %ld with %lu to fix compiler warning.
> ...
>
> However, the attached diff doesn't seem to have this change.
>
> I assume this is a reference to this:
> ohshite(_("realloc failed (%ld bytes)"), pathlen);
>
> However changing %ld to %lu is still not correct because the actual
> type of pathlen (which is a size_t) isn't known.
>
> This should read:
> ohshite(_("realloc failed (%lu bytes)"), (unsigned long)pathlen);
> or the corresponding thing with %ld and (long) - I think we can safely
> assume that pathlen will be <= LONG_MAX.
I wonder if we're at the point yet where we can use %zu, per C99, and
avoid the cast. It would certainly work on Linux.
--
Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/>
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]