help / color / mirror / Atom feed
From: Ingo Schwarze <>
To: Joerg Sonnenberger <>
Subject: Re: mdocml: The st_size member of struct stat is off_t, which is signed, all
Date: Wed, 11 Mar 2015 14:30:31 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hi Joerg,

Joerg Sonnenberger wrote on Wed, Mar 11, 2015 at 02:18:01AM +0100:
> On Wed, Mar 11, 2015 at 02:10:32AM +0100, Ingo Schwarze wrote:
>> Joerg Sonnenberger wrote on Tue, Mar 10, 2015 at 10:47:38PM +0100:
>>> On Tue, Mar 10, 2015 at 09:18:22AM -0500, wrote:

>>>> Log Message:
>>>> -----------
>>>> The st_size member of struct stat is off_t, which is signed,
>>>> all required by POSIX.  So don't compare it against against 
>>>> an unsigned constant.

>>> Well, the change truncates the value.

>> How so?  The actual width of size_t will hardly be narrower
>> than the width of off_t on any sane platform, or am i mistaken?

> Most 32bit platforms are exactly like that. size_t will be 32bit, off_t
> will be 64bit. So casting the off_t to size_t will rip out the higher
> bits.

Indeed, i misread header files.

So i changed the line in the way you proposed.

Thanks for the cluestick!
 To unsubscribe send an email to

      reply	other threads:[~2015-03-11 13:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
     [not found] ` <>
2015-03-11  1:10   ` Ingo Schwarze
2015-03-11  1:18     ` Joerg Sonnenberger
2015-03-11 13:30       ` Ingo Schwarze [this message]

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:

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

  git send-email \ \ \ \ \

* 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).