[PATCH] Change maxsize_* and last_* from size_t to uint64_t in memusagestat.c
Sun Nov 1 04:51:00 GMT 2009
On Saturday 31 October 2009 21:58:49 Carlos O'Donell wrote:
> On Fri, Oct 30, 2009 at 9:45 AM, Holger Freyther <email@example.com> wrote:
> > 2009-10-30 Holger Hans Peter Freyther <firstname.lastname@example.org>
> > * malloc/memusagestat.c (main): Change the type from size_t to
> > uint64_t in maxsize_heap, maxsize_stack, maxsize_total, last_heap,
> > last_stack, last_total to avoid assigning from an unsigned to a signed
> > type.
> Same problem as before with your ChangeLog.
> The comment is also incorrect. The type size_t is by definition
> unsigned, therefore there should be no assignment from a signed to
> unsigned type.
My bad, I was thinking of ssize_t when writing it.
> What is the actual error message you were seeing?
I was probably trying to fix this and my first step was to fix things that
looked broken to me. I have not seen any compiler warning about possible
trunication though. I think it is safe and sane to use uint64_t instead of
size_t. In one way it feels more natural as struct entry is using it (as you
More information about the Libc-help