This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [COMMITTED PATCH] Use ElfW(Off) rather than off_t for offsetswithin ELF files.


On Tue, Oct 2, 2012 at 7:03 PM, Roland McGrath <roland@hack.frob.com> wrote:
> On configurations where off_t is larger than ElfW(Off), there was a warning
> about casting to a pointer from a larger integer type in this line:
>
>         l->l_phdr = (void *) (c->mapstart + header->e_phoff - c->mapoff);
>
> Since c->mapoff was off_t, it gave the whole expression a 64-bit type.
> There's no need for mapoff to be off_t, since it only ever holds values
> computed as ElfW(Off) anyway.  Using ElfW(Off) instead saves a little
> stack space as well as avoiding that warning.

Thanks for all the cleanups!

I've been enjoying watching them go by.

Do you think we'll ever get to -Werror some day? :-)

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]