Merge branch 'js/commit-slab-decl-fix'
authorJunio C Hamano <gitster@pobox.com>
Wed, 10 Aug 2016 19:33:20 +0000 (12:33 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Aug 2016 19:33:20 +0000 (12:33 -0700)
* js/commit-slab-decl-fix:
commit-slab.h: avoid duplicated global static variables
config.c: avoid duplicated global static variables

builtin/config.c
commit-slab.h
index a991a53418506f18f439212f8cfe1f6f994ea571..6cbf73369b2f6cf41430d78e0a5e8ffa18de6d15 100644 (file)
@@ -25,7 +25,6 @@ static char term = '\n';
 static int use_global_config, use_system_config, use_local_config;
 static struct git_config_source given_config_source;
 static int actions, types;
-static const char *get_color_slot, *get_colorbool_slot;
 static int end_null;
 static int respect_includes = -1;
 static int show_origin;
index f84b449413d434b8145426503a98bcd4f9ad995f..006a50b5481b552278931f5aec33883d79891a80 100644 (file)
@@ -126,16 +126,16 @@ static MAYBE_UNUSED elemtype *slabname## _peek(struct slabname *s,        \
        return slabname##_at_peek(s, c, 0);                             \
 }                                                                      \
                                                                        \
-static int stat_ ##slabname## realloc
+struct slabname
 
 /*
- * Note that this seemingly redundant second declaration is required
+ * Note that this redundant forward declaration is required
  * to allow a terminating semicolon, which makes instantiations look
  * like function declarations.  I.e., the expansion of
  *
  *    define_commit_slab(indegree, int);
  *
- * ends in 'static int stat_indegreerealloc;'.  This would otherwise
+ * ends in 'struct indegree;'.  This would otherwise
  * be a syntax error according (at least) to ISO C.  It's hard to
  * catch because GCC silently parses it by default.
  */