Re: git-rebase (1.5.0.6) errors
2007/5/18, David Kastrup <dak@gnu.org>:
Show 31 quoted lines
> "Paolo Teti" <paolo.teti@gmail.com> writes:
>
> > 2007/5/18, Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>:
> >
> >> ...sizeof(size_t) == sizeof(int) should hold...
> >
> > what I have reported is not necessarily the cause of your error. Yes
> >
> > BUT size_t is UNSIGNED and ssize_t is SIGNED.
> >
> > The problem is that We store a signed return value into a unsigned variable.
> > So the check against -1 has no sense.
>
> When comparing signed with unsigned types, the signed values are first
> converted to unsigned, then possibly zero-extended.
>
> So
>
> (unsigned)-1 == (int)-1
>
> but
>
> (unsigned long)-1 == (long)-1
>
> only when sizeof(long)==size(int)
>
> > and please note that also sizeof(int) == sizeof(unsigned int), but
> > -1 is a signed int !!
>
> So?
>
Stupid me.. OK is == -1 and not < 0..
Probably today I'm drunk without drink ..
Enjoy