From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: apelisse@gmail.com
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH] mailmap.c: Fix a sparse warning
Date: Sat, 15 Dec 2012 19:25:21 +0000 [thread overview]
Message-ID: <50CCCEA1.1020000@ramsay1.demon.co.uk> (raw)
In particular, sparse issues an "Using plain integer as NULL pointer"
warning (line 214), since an integer zero is passed as the second
actual argument in a strbuf_detach() call. The expected type for
this parameter is 'size_t *'. In order to suppress the warning, we
simply pass a NULL pointer constant instead.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Antoine,
When you re-roll your mailmap patches (branch 'ap/log-mailmap') could
you please squash this into commit a09b6cd9 ("mailmap: Remove buffer
length limit in map_user", 11-12-2012).
Thanks!
ATB,
Ramsay Jones
mailmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mailmap.c b/mailmap.c
index e636278..0608eb3 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -211,7 +211,7 @@ int map_user(struct string_list *map,
for (i = 0; i < end_of_email - email; i++)
strbuf_addch(&buf, tolower(email[i]));
strbuf_addch(&buf, 0);
- mailbuf = strbuf_detach(&buf, 0);
+ mailbuf = strbuf_detach(&buf, NULL);
debug_mm("map_user: map '%s' <%s>\n", name, mailbuf);
item = string_list_lookup(map, mailbuf);
--
1.8.0
reply other threads:[~2012-12-15 19:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50CCCEA1.1020000@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=apelisse@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).