git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] clean up extern decl of functions
@ 2020-10-08 15:27 Junio C Hamano
  2020-10-09  1:55 ` Denton Liu
  0 siblings, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2020-10-08 15:27 UTC (permalink / raw)
  To: git; +Cc: Denton Liu

Among external function declarations, somehow only these two
functions that return pointer-to-function were declared with
"extern" in front.

Ideally, we should standardise to _have_ explicit "extern" in front
for all function (and data) decls, but let's make things uniform
first.  Bulk re-addition of extern can be done without any extra
difficulty with or without this change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 * A patch before morning coffee, could be totally off the mark with
   trivial thinko.

 git-compat-util.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-compat-util.h b/git-compat-util.h
index 7a0fb7a045..56e0e1e79d 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -491,9 +491,9 @@ static inline int const_error(void)
 
 void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
 void set_error_routine(void (*routine)(const char *err, va_list params));
-extern void (*get_error_routine(void))(const char *err, va_list params);
+void (*get_error_routine(void))(const char *err, va_list params);
 void set_warn_routine(void (*routine)(const char *warn, va_list params));
-extern void (*get_warn_routine(void))(const char *warn, va_list params);
+void (*get_warn_routine(void))(const char *warn, va_list params);
 void set_die_is_recursing_routine(int (*routine)(void));
 
 int starts_with(const char *str, const char *prefix);

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-10-15 19:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 15:27 [PATCH] clean up extern decl of functions Junio C Hamano
2020-10-09  1:55 ` Denton Liu
2020-10-09  2:47   ` Junio C Hamano
2020-10-09 19:26     ` Junio C Hamano
2020-10-09 19:27       ` [RFC] CodingGuidelines: mark external declarations with "extern" Junio C Hamano
2020-10-09 19:57         ` Jeff King
2020-10-09 20:33           ` Junio C Hamano
2020-10-09 23:00             ` Denton Liu
2020-10-09 23:05               ` Junio C Hamano
2020-10-10  0:37             ` Đoàn Trần Công Danh
2020-10-15  1:36             ` Jeff King
2020-10-15 17:15               ` Junio C Hamano
2020-10-15 19:28                 ` Jeff King
2020-10-15 19:30                   ` [PATCH v2 1/2] usage: define a type for a reporting function Jeff King
2020-10-15 19:30                   ` [PATCH v2 2/2] config.mak.dev: build with -fno-common Jeff King

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).