From: Maciej Żenczykowski
This fixes:
test-common.c: In function 'test_realloc':
test-common.c:109:8: error: 'block' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
block = realloc(block, sizeof(*block) + size);
^
Signed-off-by: Maciej Żenczykowski
Signed-off-by: David Decotigny
---
test-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test-common.c b/test-common.c
index adc3cd4..cd63d1d 100644
--- a/test-common.c
+++ b/test-common.c
@@ -100,7 +100,7 @@ void test_free(void *ptr)
void *test_realloc(void *ptr, size_t size)
{
- struct list_head *block;
+ struct list_head *block = NULL;
if (ptr) {
block = (struct list_head *)ptr - 1;
--
2.7.0.rc3.207.g0ac5344