* [PATCH] builtin/commit.c: fix type warnings from gcc and sparse
@ 2014-08-29 16:36 Ramsay Jones
2014-08-29 18:44 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2014-08-29 16:36 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, GIT Mailing-list
On 32-bit platforms (only), gcc and sparse both issue warnings
about the type of the pointer expression passed as the third
argument to find_commit_header(). In order to suppress the
warnings, we simply change the type of the 'len' variable to
size_t.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Jeff,
If you need to re-roll your 'jk/commit-author-parsing' series, could
you please squash this into the equivalent of commit 95b5989
("determine_author_info(): reuse parsing functions", 27-08-2014).
Thanks!
ATB,
Ramsay Jones
builtin/commit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index a9bef73..7cb9981 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -583,7 +583,7 @@ static void determine_author_info(struct strbuf *author_ident)
if (author_message) {
struct ident_split ident;
- unsigned long len;
+ size_t len;
const char *a;
a = find_commit_header(author_message_buffer, "author", &len);
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] builtin/commit.c: fix type warnings from gcc and sparse
2014-08-29 16:36 [PATCH] builtin/commit.c: fix type warnings from gcc and sparse Ramsay Jones
@ 2014-08-29 18:44 ` Jeff King
2014-08-29 22:17 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2014-08-29 18:44 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list
On Fri, Aug 29, 2014 at 05:36:21PM +0100, Ramsay Jones wrote:
> On 32-bit platforms (only), gcc and sparse both issue warnings
> about the type of the pointer expression passed as the third
> argument to find_commit_header(). In order to suppress the
> warnings, we simply change the type of the 'len' variable to
> size_t.
>
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Thanks, this looks good to me. I think I just switched between size_t
and "unsigned long" during the development and forgot to tweak this
spot.
> If you need to re-roll your 'jk/commit-author-parsing' series, could
> you please squash this into the equivalent of commit 95b5989
> ("determine_author_info(): reuse parsing functions", 27-08-2014).
I don't think I have any other reason to re-roll at this point. I'm
happy to have this on top, or it can be squashed into the second from
the top (95b5989) if we want to keep the history cleaner.
I'm also happy to re-roll just for this, but my impression is that is
not really any easier on Junio than just squashing a patch in.
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] builtin/commit.c: fix type warnings from gcc and sparse
2014-08-29 18:44 ` Jeff King
@ 2014-08-29 22:17 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2014-08-29 22:17 UTC (permalink / raw)
To: Jeff King; +Cc: Ramsay Jones, GIT Mailing-list
Jeff King <peff@peff.net> writes:
> On Fri, Aug 29, 2014 at 05:36:21PM +0100, Ramsay Jones wrote:
>
>> On 32-bit platforms (only), gcc and sparse both issue warnings
>> about the type of the pointer expression passed as the third
>> argument to find_commit_header(). In order to suppress the
>> warnings, we simply change the type of the 'len' variable to
>> size_t.
>>
>> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
>
> Thanks, this looks good to me. I think I just switched between size_t
> and "unsigned long" during the development and forgot to tweak this
> spot.
>
>> If you need to re-roll your 'jk/commit-author-parsing' series, could
>> you please squash this into the equivalent of commit 95b5989
>> ("determine_author_info(): reuse parsing functions", 27-08-2014).
>
> I don't think I have any other reason to re-roll at this point. I'm
> happy to have this on top, or it can be squashed into the second from
> the top (95b5989) if we want to keep the history cleaner.
>
> I'm also happy to re-roll just for this, but my impression is that is
> not really any easier on Junio than just squashing a patch in.
Thanks for being very considerate ;-) Have squashed it in with
"rebase -i" while preparing for the mid-day pushout.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-29 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-29 16:36 [PATCH] builtin/commit.c: fix type warnings from gcc and sparse Ramsay Jones
2014-08-29 18:44 ` Jeff King
2014-08-29 22:17 ` Junio C Hamano
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).