matthew green writes:
> > > -         used = dst - conv->wbuff;
> > > +         size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
> >
> > Any particular reason why there is a cast to uintptr_t here? I don't
> > think there is a guarantee that you can calculate an offset by
> > subtracting uintptr_ts calculated from pointers. The description in the
> > C Standard only guarantees that you can convert them back to a pointer
> > which compares the same to the original, but that's it. I don't find any
> > other promises about uintptr_t.
>
> in this case, they're not necessary it seems.  probably left
> over from my initial attempts at this workaround.

uh, apparently i forgot to save the file before compiling,
because simply removing them returns the sign-compare warning,
but that's fixable by using ptrdiff_t.


.mrg.

Reply via email to