THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

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>
tags/v2.20.0-rc0
Carlo Marcelo Arenas Belón Junio C Hamano 1 year ago
parent
commit
bbd8eb3ecb
2 changed files with 4 additions and 2 deletions
  1. +2
    -2
      commit-slab-impl.h
  2. +2
    -0
      git-compat-util.h

+ 2
- 2
commit-slab-impl.h View File

@@ -1,10 +1,10 @@
#ifndef COMMIT_SLAB_IMPL_H
#define COMMIT_SLAB_IMPL_H

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

#define implement_static_commit_slab(slabname, elemtype) \
implement_commit_slab(slabname, elemtype, static MAYBE_UNUSED)
implement_commit_slab(slabname, elemtype, MAYBE_UNUSED static)

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


+ 2
- 0
git-compat-util.h View File

@@ -408,6 +408,8 @@ static inline char *git_find_last_dir_sep(const char *path)
#define LAST_ARG_MUST_BE_NULL
#endif

#define MAYBE_UNUSED __attribute__((__unused__))

#include "compat/bswap.h"

#include "wildmatch.h"


Loading…
Cancel
Save