Skip to content

Commit 7a3ea66

Browse files
committed
Merge branch 'js/commit-slab-decl-fix'
* js/commit-slab-decl-fix: commit-slab.h: avoid duplicated global static variables config.c: avoid duplicated global static variables
2 parents 483ca93 + af920e3 commit 7a3ea66

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

builtin/config.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ static char term = '\n';
2525
static int use_global_config, use_system_config, use_local_config;
2626
static struct git_config_source given_config_source;
2727
static int actions, types;
28-
static const char *get_color_slot, *get_colorbool_slot;
2928
static int end_null;
3029
static int respect_includes = -1;
3130
static int show_origin;

commit-slab.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,16 @@ static MAYBE_UNUSED elemtype *slabname## _peek(struct slabname *s, \
126126
return slabname##_at_peek(s, c, 0); \
127127
} \
128128
\
129-
static int stat_ ##slabname## realloc
129+
struct slabname
130130

131131
/*
132-
* Note that this seemingly redundant second declaration is required
132+
* Note that this redundant forward declaration is required
133133
* to allow a terminating semicolon, which makes instantiations look
134134
* like function declarations. I.e., the expansion of
135135
*
136136
* define_commit_slab(indegree, int);
137137
*
138-
* ends in 'static int stat_indegreerealloc;'. This would otherwise
138+
* ends in 'struct indegree;'. This would otherwise
139139
* be a syntax error according (at least) to ISO C. It's hard to
140140
* catch because GCC silently parses it by default.
141141
*/

0 commit comments

Comments
 (0)