"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Fix off_t type mismatches
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 24 Jul 2022 22:48:58 +0200

Download raw body.

Thread
On Sun, Jul 24, 2022 at 04:43:05PM +0200, Christian Weisgerber wrote:
> This addresses a number of warnings produced when compiling Got on
> FreeBSD and fixes off_t type mismatches.
> 
> * off_t is a signed type.
> * Depending on the platform, off_t can be "long" or "long long", so
>   cast to long long for printf().
> 
> OK?

ok stsp

> There may be an underlying type mismatch if pack file offsets are
> uint64_t but are handled in off_t variables, which are int64_t.  As
> long as they refer to non-sparse files, I don't execpt that to be
> a practical problem anytime soon.

Agreed. There is no reason why a valid pack file would be sparse.