git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
c3c3486
)
BUG_exit_code: fix sparse "symbol not declared" warning
author
Ramsay Jones
<redacted>
Wed, 9 May 2018 17:04:06 +0000
(18:04 +0100)
committer
Junio C Hamano
<redacted>
Thu, 10 May 2018 09:23:09 +0000
(18:23 +0900)
Signed-off-by: Ramsay Jones <redacted>
Signed-off-by: Junio C Hamano <redacted>
git-compat-util.h
patch
|
blob
|
history
t/helper/test-tool.c
patch
|
blob
|
history
diff --git
a/git-compat-util.h
b/git-compat-util.h
index 3a7216f53138d53544c4805c96bd6ec6df99d844..3a051de4506809b3e3bd454d175ea1d5dacbc6c4 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-1111,6
+1111,9
@@
static inline int regexec_buf(const regex_t *preg, const char *buf, size_t size,
#define HAVE_VARIADIC_MACROS 1
#endif
+/* usage.c: only to be used for testing BUG() implementation (see test-tool) */
+extern int BUG_exit_code;
+
#ifdef HAVE_VARIADIC_MACROS
__attribute__((format (printf, 3, 4))) NORETURN
void BUG_fl(const char *file, int line, const char *fmt, ...);
diff --git
a/t/helper/test-tool.c
b/t/helper/test-tool.c
index 5176f9f20ae6ff3e09c3793844d6482d94116f70..805a45de9c877d9e5fecb6aa543e6ac985443d5b 100644
(file)
--- a/
t/helper/test-tool.c
+++ b/
t/helper/test-tool.c
@@
-47,7
+47,6
@@
static struct test_cmd cmds[] = {
int cmd_main(int argc, const char **argv)
{
int i;
- extern int BUG_exit_code;
BUG_exit_code = 99;
if (argc < 2)
git clone https://git.99rst.org/PROJECT