Skip to content

Commit

Permalink
Eliminate 'unused parameter' gcc warning in free() if IGNORE_FREE
Browse files Browse the repository at this point in the history
(a cherry-pick of commit c3e77d2 from 'master')

PR #598 (bdwgc).

* malloc.c [REDIRECT_FREE && !REDIRECT_MALLOC_IN_HEADER]
(free): Specify p is an unused argument.
  • Loading branch information
plajjan authored and ivmai committed Feb 3, 2024
1 parent 9da2c68 commit 4e2e469
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ GC_API void GC_CALL GC_free(void * p)
# define REDIRECT_FREE_F REDIRECT_FREE
# endif

void free(void * p)
void free(void * p GC_ATTR_UNUSED)
{
# ifndef IGNORE_FREE
# if defined(GC_LINUX_THREADS) && !defined(USE_PROC_FOR_LIBRARIES)
Expand Down

0 comments on commit 4e2e469

Please sign in to comment.