git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Beat Bolli <dev+git@drbeat.li>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Beat Bolli <dev+git@drbeat.li>
Subject: [PATCH 2/2] remote-odb: un-inline function remote_odb_reinit
Date: Tue, 24 Jul 2018 23:52:23 +0200	[thread overview]
Message-ID: <20180724215223.27516-3-dev+git@drbeat.li> (raw)
In-Reply-To: <20180724215223.27516-1-dev+git@drbeat.li>

When compiling under Apple LLVM version 9.1.0 (clang-902.0.39.2) with
"make DEVELOPER=1 DEVOPTS=pedantic", the compiler says

    remote-odb.c:87:2: error: static function 'remote_odb_do_init' is
    used in an inline function with external linkage
    [-Werror,-Wstatic-in-inline]

Remove the inline specifier that would only make sense if
remote_odb_reinit were defined in the header file. Moving it into the
header is not possible because the called function remote_odb_do_init is
static and thus not visible from the includers of the header.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
 remote-odb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/remote-odb.c b/remote-odb.c
index 847a86505778..49cf8e30aa92 100644
--- a/remote-odb.c
+++ b/remote-odb.c
@@ -82,7 +82,7 @@ static inline void remote_odb_init(void)
 	remote_odb_do_init(0);
 }
 
-inline void remote_odb_reinit(void)
+void remote_odb_reinit(void)
 {
 	remote_odb_do_init(1);
 }
-- 
2.18.0


  parent reply	other threads:[~2018-07-24 21:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 21:52 [PATCH 0/2] Pedantic fixes for Apple clang Beat Bolli
2018-07-24 21:52 ` [PATCH 1/2] packfile: drop a repeated enum declaration Beat Bolli
2018-07-24 21:57   ` Jonathan Nieder
2018-07-24 21:52 ` Beat Bolli [this message]
2018-07-24 21:59   ` [PATCH 2/2] remote-odb: un-inline function remote_odb_reinit Jonathan Nieder
2018-07-24 22:03     ` Beat Bolli
2018-07-25  7:29       ` Christian Couder
2018-07-25 21:16         ` 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

  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=20180724215223.27516-3-dev+git@drbeat.li \
    --to=dev+git@drbeat.li \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --subject='Re: [PATCH 2/2] remote-odb: un-inline function remote_odb_reinit' \
    /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

Code repositories for project(s) associated with this 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).