Skip to content

Commit f1160b2

Browse files
committed
Merge branch 'jk/maybe-unused-cleanup'
Code clean-up. * jk/maybe-unused-cleanup: grep: prefer UNUSED to MAYBE_UNUSED for pcre allocators gc: drop MAYBE_UNUSED annotation from used parameter
2 parents 21c6608 + 516a9ec commit f1160b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

builtin/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static int pack_refs_condition(UNUSED struct gc_config *cfg)
260260
return 1;
261261
}
262262

263-
static int maintenance_task_pack_refs(MAYBE_UNUSED struct maintenance_run_opts *opts,
263+
static int maintenance_task_pack_refs(struct maintenance_run_opts *opts,
264264
UNUSED struct gc_config *cfg)
265265
{
266266
struct child_process cmd = CHILD_PROCESS_INIT;

grep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ static int is_fixed(const char *s, size_t len)
245245
#ifdef USE_LIBPCRE2
246246
#define GREP_PCRE2_DEBUG_MALLOC 0
247247

248-
static void *pcre2_malloc(PCRE2_SIZE size, MAYBE_UNUSED void *memory_data)
248+
static void *pcre2_malloc(PCRE2_SIZE size, void *memory_data UNUSED)
249249
{
250250
void *pointer = malloc(size);
251251
#if GREP_PCRE2_DEBUG_MALLOC
@@ -255,7 +255,7 @@ static void *pcre2_malloc(PCRE2_SIZE size, MAYBE_UNUSED void *memory_data)
255255
return pointer;
256256
}
257257

258-
static void pcre2_free(void *pointer, MAYBE_UNUSED void *memory_data)
258+
static void pcre2_free(void *pointer, void *memory_data UNUSED)
259259
{
260260
#if GREP_PCRE2_DEBUG_MALLOC
261261
static int count = 1;

0 commit comments

Comments
 (0)