From 844f5b20627a09f1a52f3ca39f047ca7504712d5 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 5 Aug 2016 10:57:13 +0200 Subject: [PATCH 1/2] pool: provide macro to statically initialize git_pool --- src/pool.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pool.h b/src/pool.h index e0fafa997..f61f16944 100644 --- a/src/pool.h +++ b/src/pool.h @@ -35,6 +35,8 @@ typedef struct { uint32_t page_size; /* size of page in bytes */ } git_pool; +#define GIT_POOL_INIT { NULL, 0, 0 } + #else /** @@ -57,6 +59,9 @@ typedef struct { uint32_t item_size; uint32_t page_size; } git_pool; + +#define GIT_POOL_INIT { GIT_VECTOR_INIT, 0, 0 } + #endif /** From 274a727e0bac38fdfe04e8b4999056169d48c325 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 5 Aug 2016 10:57:42 +0200 Subject: [PATCH 2/2] apply: fix warning when initializing patch images --- src/apply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apply.c b/src/apply.c index 40ba647f4..10bf1f492 100644 --- a/src/apply.c +++ b/src/apply.c @@ -38,7 +38,7 @@ static void patch_line_init( out->content_offset = in_offset; } -#define PATCH_IMAGE_INIT { {0} } +#define PATCH_IMAGE_INIT { GIT_POOL_INIT, GIT_VECTOR_INIT } static int patch_image_init_fromstr( patch_image *out, const char *in, size_t in_len)