Re: [SCM] dpkg's main repository branch, parsechangelog, updated. 1.14.12-36-g2d2cda5
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 <djpig@debian.org>
> +
> + * 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.
Ian.
Reply to: