From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] archive-tar: fix a sparse 'constant too large' warning
Date: Thu, 4 May 2017 11:26:40 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1.1705041121520.4905@virtualbox> (raw)
In-Reply-To: <252ddd6a-3516-6619-8ea6-d3897f13d93d@ramsayjones.plus.com>
Hi Ramsay,
On Thu, 4 May 2017, Ramsay Jones wrote:
> diff --git a/archive-tar.c b/archive-tar.c
> index 319a5b1c7..6dddc0cff 100644
> --- a/archive-tar.c
> +++ b/archive-tar.c
> @@ -33,7 +33,7 @@ static int write_tar_filter_archive(const struct archiver *ar,
> #if TIME_MAX == 0xFFFFFFFF
> #define USTAR_MAX_MTIME TIME_MAX
> #else
> -#define USTAR_MAX_MTIME 077777777777UL
> +#define USTAR_MAX_MTIME 077777777777ULL
> #endif
>
Funny. This problem was pointed out by Hannes Sixt (IIRC) and I fixed this
very thing in v6.
Except I did not. I changed the wrong constant! Instead of
USTAR_MAX_MTIME, I adjusted USTAR_MAX_SIZE. D'oh.
I just saw that my patch series already hit `next`, so I fear you are
right that we need a follow-up patch. Maybe we want this diff, though?
-- snipsnap --
diff --git a/archive-tar.c b/archive-tar.c
index 319a5b1c7cd..073e60ebd3c 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -28,12 +28,12 @@ static int write_tar_filter_archive(const struct archiver *ar,
#if ULONG_MAX == 0xFFFFFFFF
#define USTAR_MAX_SIZE ULONG_MAX
#else
-#define USTAR_MAX_SIZE 077777777777ULL
+#define USTAR_MAX_SIZE 077777777777UL
#endif
#if TIME_MAX == 0xFFFFFFFF
#define USTAR_MAX_MTIME TIME_MAX
#else
-#define USTAR_MAX_MTIME 077777777777UL
+#define USTAR_MAX_MTIME 077777777777ULL
#endif
/* writes out the whole block, but only if it is full */
next prev parent reply other threads:[~2017-05-04 9:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 23:41 [PATCH] archive-tar: fix a sparse 'constant too large' warning Ramsay Jones
2017-05-04 9:26 ` Johannes Schindelin [this message]
2017-05-05 1:21 ` Ramsay Jones
2017-05-08 0:19 ` Junio C Hamano
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=alpine.DEB.2.21.1.1705041121520.4905@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=ramsay@ramsayjones.plus.com \
/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).