commit-slabs: move MAYBE_UNUSED out
after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18) it is expected to be used to prevent -Wunused-function warnings for code that was macro generated Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlo Marcelo Arenas Belón committed
Oct 23, 2018 at 14:50 UTC
bbd8eb3ecbc5ea9822c88e50af653999e16bd2ee
2 files changed
+4
-2
commit-slab-impl.h
+2
-2
@@ -1,10 +1,10 @@
1
#ifndef COMMIT_SLAB_IMPL_H
2
#define COMMIT_SLAB_IMPL_H
3
4
-#define MAYBE_UNUSED __attribute__((__unused__))
4
+#include "git-compat-util.h"
5
6
#define implement_static_commit_slab(slabname, elemtype) \
7
- implement_commit_slab(slabname, elemtype, static MAYBE_UNUSED)
7
+ implement_commit_slab(slabname, elemtype, MAYBE_UNUSED static)
8
9
#define implement_shared_commit_slab(slabname, elemtype) \
10
implement_commit_slab(slabname, elemtype, )
git-compat-util.h
+2
@@ -408,6 +408,8 @@ static inline char *git_find_last_dir_sep(const char *path)
408
#define LAST_ARG_MUST_BE_NULL
409
#endif
410
411
+#define MAYBE_UNUSED __attribute__((__unused__))
412
+
413
#include "compat/bswap.h"
414
415
#include "wildmatch.h"