From 76774528be2808110085450f499b5d5befb297cf Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 15 Sep 2017 09:50:57 -0700 Subject: [PATCH] test/bdev: initialize descriptor array in open_write_test A later patch in this series fails the test pool because scan-build says we might be using garbage for one of the descriptor pointer comparisons. That later patch does not touch this unit test file at all, and the bdev-related changes do not touch the code path used around the bug report. But the report is valid - it's possible that with the additional bdev.c changes that scan-build's ability to detect this bug changed for the better. Signed-off-by: Jim Harris Change-Id: I2bf165fe4d91a13d481010176a0339b591b16014 Reviewed-on: https://review.gerrithub.io/378825 Reviewed-by: Daniel Verkamp Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker --- test/unit/lib/bdev/bdev.c/bdev_ut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/lib/bdev/bdev.c/bdev_ut.c b/test/unit/lib/bdev/bdev.c/bdev_ut.c index 167cadb7d..8e25cc660 100644 --- a/test/unit/lib/bdev/bdev.c/bdev_ut.c +++ b/test/unit/lib/bdev/bdev.c/bdev_ut.c @@ -187,7 +187,7 @@ static void open_write_test(void) { struct spdk_bdev *bdev[8]; - struct spdk_bdev_desc *desc[8]; + struct spdk_bdev_desc *desc[8] = {}; int rc; /*