From: "Shawn O. Pearce" <spearce@spearce.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] fast-import: Fix compile warnings
Date: Thu, 8 Feb 2007 02:03:42 -0500 [thread overview]
Message-ID: <20070208070342.GA3746@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.63.0702071237360.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Not on all platforms are size_t and unsigned long equivalent.
> Since I do not know how portable %z is, I play safe, and just
> cast the respective variables to unsigned long.
We do this elsewhere in Git. blobs are using unsigned long in
sha1_file.c for their length; I chose to size_t in gfi as that's
what the type is for... but then look at the mess.
I applied this patch to my tree and pushed it to repo.or.cz.
This last hunk:
> @@ -2028,7 +2030,8 @@ int main(int argc, const char **argv)
> fprintf(stderr, " marks: %10ju (%10ju unique )\n", (((uintmax_t)1) << marks->shift) * 1024, marks_set_count);
> fprintf(stderr, " atoms: %10u\n", atom_cnt);
> fprintf(stderr, "Memory total: %10ju KiB\n", (total_allocd + alloc_count*sizeof(struct object_entry))/1024);
> - fprintf(stderr, " pools: %10lu KiB\n", total_allocd/1024);
> + fprintf(stderr, " pools: %10lu KiB\n",
> + (unsigned long)(total_allocd / 1024));
> fprintf(stderr, " objects: %10ju KiB\n", (alloc_count*sizeof(struct object_entry))/1024);
> fprintf(stderr, "---------------------------------------------------------------------\n");
> pack_report();
was the only part that did not apply cleanly, but that was easily
fixed by tossing an extra tab at the start of each line, as this
hunk was shifted in one level by a recent commit that Junio has
not pushed out to master.
--
Shawn.
next prev parent reply other threads:[~2007-02-08 7:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-07 11:38 [RFC/PATCH] fast-import: Fix compile warnings Johannes Schindelin
2007-02-07 12:19 ` Alex Riesen
2007-02-07 17:24 ` Junio C Hamano
2007-02-07 17:35 ` Johannes Schindelin
2007-02-07 17:47 ` Junio C Hamano
2007-02-08 7:03 ` Shawn O. Pearce [this message]
2007-02-08 7:10 ` Junio C Hamano
2007-02-08 7:16 ` Shawn O. Pearce
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=20070208070342.GA3746@spearce.org \
--to=spearce@spearce.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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).