From 563b98223beb23d85439436ec17782cde97711bb Mon Sep 17 00:00:00 2001 From: Hailiang Wang Date: Thu, 25 Jul 2019 11:50:36 +0800 Subject: [PATCH] lib/compress: fix a compilation error for low GCC version Some low GCC(such as v4.8.5) can't recognize this style: static struct rte_comp_xform g_comp_xform = (struct rte_comp_xform) Fix issue #877. Change-Id: I021c62b7b1437d67ce87cc2e13d1b90ea6a18140 Signed-off-by: Hailiang Wang Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463126 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris --- lib/bdev/compress/vbdev_compress.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/bdev/compress/vbdev_compress.c b/lib/bdev/compress/vbdev_compress.c index 767117857..4c0309141 100644 --- a/lib/bdev/compress/vbdev_compress.c +++ b/lib/bdev/compress/vbdev_compress.c @@ -146,8 +146,7 @@ static bool g_qat_available = false; static bool g_isal_available = false; /* Create shrared (between all ops per PMD) compress xforms. */ -static struct rte_comp_xform g_comp_xform = (struct rte_comp_xform) -{ +static struct rte_comp_xform g_comp_xform = { .type = RTE_COMP_COMPRESS, .compress = { .algo = RTE_COMP_ALGO_DEFLATE, @@ -159,8 +158,7 @@ static struct rte_comp_xform g_comp_xform = (struct rte_comp_xform) } }; /* Create shrared (between all ops per PMD) decompress xforms. */ -static struct rte_comp_xform g_decomp_xform = (struct rte_comp_xform) -{ +static struct rte_comp_xform g_decomp_xform = { .type = RTE_COMP_DECOMPRESS, .decompress = { .algo = RTE_COMP_ALGO_DEFLATE,