Skip to content

Commit bbd8eb3

Browse files
carenasgitster
authored andcommitted
commit-slabs: move MAYBE_UNUSED out
after 36da893 ("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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c4df23f commit bbd8eb3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

commit-slab-impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef COMMIT_SLAB_IMPL_H
22
#define COMMIT_SLAB_IMPL_H
33

4-
#define MAYBE_UNUSED __attribute__((__unused__))
4+
#include "git-compat-util.h"
55

66
#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)
88

99
#define implement_shared_commit_slab(slabname, elemtype) \
1010
implement_commit_slab(slabname, elemtype, )

git-compat-util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ static inline char *git_find_last_dir_sep(const char *path)
408408
#define LAST_ARG_MUST_BE_NULL
409409
#endif
410410

411+
#define MAYBE_UNUSED __attribute__((__unused__))
412+
411413
#include "compat/bswap.h"
412414

413415
#include "wildmatch.h"

0 commit comments

Comments
 (0)