From 88e635e0b98101c4850cb255e00819b59adc6b36 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 1 Jun 2016 08:45:13 +0200 Subject: [PATCH] fix warning: declaration of 'free' shadows a global declaration With some old OS X release --- lib/nghttp2_mem.c | 4 ++-- lib/nghttp2_mem.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/nghttp2_mem.c b/lib/nghttp2_mem.c index 317363a7..e0b7c29e 100644 --- a/lib/nghttp2_mem.c +++ b/lib/nghttp2_mem.c @@ -52,8 +52,8 @@ void nghttp2_mem_free(nghttp2_mem *mem, void *ptr) { mem->free(ptr, mem->mem_user_data); } -void nghttp2_mem_free2(nghttp2_free free, void *ptr, void *mem_user_data) { - free(ptr, mem_user_data); +void nghttp2_mem_free2(nghttp2_free free_func, void *ptr, void *mem_user_data) { + free_func(ptr, mem_user_data); } void *nghttp2_mem_calloc(nghttp2_mem *mem, size_t nmemb, size_t size) { diff --git a/lib/nghttp2_mem.h b/lib/nghttp2_mem.h index 7709e1c5..2d1bd6a0 100644 --- a/lib/nghttp2_mem.h +++ b/lib/nghttp2_mem.h @@ -38,7 +38,7 @@ nghttp2_mem *nghttp2_mem_default(void); |mem|. */ void *nghttp2_mem_malloc(nghttp2_mem *mem, size_t size); void nghttp2_mem_free(nghttp2_mem *mem, void *ptr); -void nghttp2_mem_free2(nghttp2_free free, void *ptr, void *mem_user_data); +void nghttp2_mem_free2(nghttp2_free free_func, void *ptr, void *mem_user_data); void *nghttp2_mem_calloc(nghttp2_mem *mem, size_t nmemb, size_t size); void *nghttp2_mem_realloc(nghttp2_mem *mem, void *ptr, size_t size);