From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: mhagger@alum.mit.edu
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH] object.c: Fix a sparse warning
Date: Sat, 01 Jun 2013 18:46:11 +0100 [thread overview]
Message-ID: <51AA3363.8030705@ramsay1.demon.co.uk> (raw)
Sparse issues an "'object_array_slopbuf' not declared. Should it be
static?" warning. In order to suppress the warning, since this
symbol does not need more than file visibility, we simply add the
static modifier to its declaration.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Michael,
If you need to re-roll the patches in your 'mh/reflife' branch,
could you please squash this into the patch corresponding to
commit cbdeb23e ("object_array_entry: fix memory handling of
the name field", 25-05-2013).
Thanks!
ATB,
Ramsay Jones
object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/object.c b/object.c
index 2976b2e..0de4c91 100644
--- a/object.c
+++ b/object.c
@@ -269,7 +269,7 @@ int object_list_contains(struct object_list *list, struct object *obj)
* A zero-length string to which object_array_entry::name can be
* initialized without requiring a malloc/free.
*/
-char object_array_slopbuf[1];
+static char object_array_slopbuf[1];
static void add_object_array_with_mode_context(struct object *obj, const char *name,
struct object_array *array,
--
1.8.3
next reply other threads:[~2013-06-01 17:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 17:46 Ramsay Jones [this message]
2013-06-02 6:12 ` [PATCH] object.c: Fix a sparse warning Michael Haggerty
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=51AA3363.8030705@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
/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).