[dpdk-dev] [PATCH] test/compress: fix max mbuf size test case
David Marchand
david.marchand at redhat.com
Fri Apr 19 12:49:10 CEST 2019
On Fri, Apr 19, 2019 at 11:57 AM Tomasz Jozwiak <tomaszx.jozwiak at intel.com>
wrote:
> Fixed the compilation error on gcc (GCC)
> 4.8.5 20150623 (Red Hat 4.8.5-28)
>
> Fixes: 355b02eedc65 ("test/compress: add max mbuf size test case")
> Cc: stable at dpdk.org
>
> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak at intel.com>
> ---
> app/test/test_compressdev.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c
> index 404b98f..603eeea 100644
> --- a/app/test/test_compressdev.c
> +++ b/app/test/test_compressdev.c
> @@ -1948,6 +1948,7 @@ test_compressdev_deflate_stateless_dynamic_big(void)
> struct comp_testsuite_params *ts_params = &testsuite_params;
> uint16_t i = 0;
> int ret = TEST_SUCCESS;
> + int j = 0;
>
Useless initialisation.
const struct rte_compressdev_capabilities *capab;
> char *test_buffer = NULL;
>
> @@ -1989,8 +1990,8 @@ test_compressdev_deflate_stateless_dynamic_big(void)
>
> /* fill the buffer with data based on rand. data */
> srand(BIG_DATA_TEST_SIZE);
> - for (uint32_t i = 0; i < BIG_DATA_TEST_SIZE - 1; ++i)
> - test_buffer[i] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
> + for (j = 0; j < BIG_DATA_TEST_SIZE - 1; ++j)
> + test_buffer[j] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
>
> test_buffer[BIG_DATA_TEST_SIZE-1] = 0;
> int_data.buf_idx = &i;
> --
> 2.7.4
>
Tested-by: David Marchand <david.marchand at redhat.com>
--
David Marchand
More information about the dev
mailing list