git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paolo Teti" <paolo.teti@gmail.com>
To: "David Kastrup" <dak@gnu.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>, git@vger.kernel.org
Subject: Re: git-rebase (1.5.0.6) errors
Date: Fri, 18 May 2007 17:08:02 +0200	[thread overview]
Message-ID: <34a7ae040705180808t1eebd9f0p5a4046d7b281c56e@mail.gmail.com> (raw)
In-Reply-To: <864pmamb6b.fsf@lola.quinscape.zz>

2007/5/18, David Kastrup <dak@gnu.org>:
> "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

  parent reply	other threads:[~2007-05-18 15:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18  8:47 git-rebase (1.5.0.6) errors Ilpo Järvinen
2007-05-18 10:31 ` Paolo Teti
2007-05-18 10:49   ` David Kastrup
2007-05-18 11:29     ` Paolo Teti
2007-05-18 14:02   ` Ilpo Järvinen
2007-05-18 14:39     ` Paolo Teti
     [not found]       ` <864pmamb6b.fsf@lola.quinscape.zz>
2007-05-18 15:08         ` Paolo Teti [this message]
2007-05-20 12:43     ` Jan Hudec
2007-05-20 19:02       ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34a7ae040705180808t1eebd9f0p5a4046d7b281c56e@mail.gmail.com \
    --to=paolo.teti@gmail.com \
    --cc=dak@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=ilpo.jarvinen@helsinki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).