From bba0f040cf421ef75c840f64d0eab55e39bc0081 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Mon, 27 Jan 2020 11:11:00 -0500 Subject: [PATCH] lib/blob: fix uninitialized variable for non-debug builds This was observed after running nighly tests on previous patch. As part of it, autopackage.sh compiles SPDK without debug flag set. Exposing the uninitialized var here. Signed-off-by: Tomasz Zawadzki Change-Id: Iedb1641f3c0d4a21f293c81cd4fcf35c6d1c7ae5 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482893 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Paul Luse --- lib/blob/blobstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index 7394baf82..6df2706af 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -137,7 +137,7 @@ static int _spdk_bs_allocate_cluster(struct spdk_blob *blob, uint32_t cluster_num, uint64_t *lowest_free_cluster, uint32_t *lowest_free_md_page, bool update_map) { - uint32_t *extent_page; + uint32_t *extent_page = 0; pthread_mutex_lock(&blob->bs->used_clusters_mutex); *lowest_free_cluster = spdk_bit_array_find_first_clear(blob->bs->used_clusters,