Re: git-rebase (1.5.0.6) errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007/5/18, David Kastrup <dak@xxxxxxx>:
"Paolo Teti" <paolo.teti@xxxxxxxxx> writes:

> 2007/5/18, Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxx>:
>
>> ...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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux