git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Matheus Tavares <matheus.bernardino@usp.br>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH] git.c: fix sparse warning
Date: Tue, 2 Jun 2020 00:27:40 +0100	[thread overview]
Message-ID: <d9686e75-0792-33f7-dd70-3dc8ca6c4d66@ramsayjones.plus.com> (raw)


Commit 4acc44d720 (config: add setting to ignore sparsity patterns in
some cmds, 2020-05-27) adds an external symbol definition without a
corresponding external symbol declaration. This causes sparse to
complain: "symbol 'opt_restrict_to_sparse_paths' was not declared.
Should it be static?".

In order to suppress the warning, #include the 'sparse-checkout.h'
header file, which contains the required extern declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Matheus,

If you need to re-roll your 'mt/grep-sparse-checkout' branch, could you
please squash this into the relevant patch.

[This is the minimum fix - but I might be tempted to move the definition
of the variable to 'sparse-checkout.c' as well.]

Thanks!

ATB,
Ramsay Jones

 git.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/git.c b/git.c
index 07de4363ef..6e62001f2f 100644
--- a/git.c
+++ b/git.c
@@ -5,6 +5,7 @@
 #include "run-command.h"
 #include "alias.h"
 #include "shallow.h"
+#include "sparse-checkout.h"
 
 #define RUN_SETUP		(1<<0)
 #define RUN_SETUP_GENTLY	(1<<1)
-- 
2.26.2

             reply	other threads:[~2020-06-01 23:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 23:27 Ramsay Jones [this message]
2020-06-03  2:17 ` [PATCH] git.c: fix sparse warning Matheus Tavares Bernardino

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=d9686e75-0792-33f7-dd70-3dc8ca6c4d66@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=git@vger.kernel.org \
    --cc=matheus.bernardino@usp.br \
    /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).