From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B022DA00E6 for ; Fri, 19 Apr 2019 13:45:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 806E51BB9D; Fri, 19 Apr 2019 13:45:43 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id B34F31BB27 for ; Fri, 19 Apr 2019 13:45:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2019 04:45:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,369,1549958400"; d="scan'208";a="152199089" Received: from tjozwiax-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.103.104.44]) by orsmga002.jf.intel.com with ESMTP; 19 Apr 2019 04:45:39 -0700 From: Tomasz Jozwiak To: dev@dpdk.org, fiona.trahe@intel.com, tomaszx.jozwiak@intel.com, yskoh@mellanox.com Date: Fri, 19 Apr 2019 13:45:38 +0200 Message-Id: <1555674338-4887-1-git-send-email-tomaszx.jozwiak@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555667827-3715-1-git-send-email-tomaszx.jozwiak@intel.com> References: <1555667827-3715-1-git-send-email-tomaszx.jozwiak@intel.com> Subject: [dpdk-dev] [PATCH v2] test/compress: fix max mbuf size test case X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190419114538.ln2sOpnfgRe9q_MtUoerpeBsIevixD1w0fheheMCTMo@z> Fixed the compilation error: ../app/test/test_compressdev.c:1949:11: note: previous definition of 'i' was here ../app/test/test_compressdev.c:1992:2: error: 'for' loop initial declarations are only allowed in C99 mode ../app/test/test_compressdev.c:1992:2: note: use option -std=c99 or -std=gnu99 to compile your code ../app/test/test_compressdev.c:1996:19: warning: assignment from incompatible pointer type [enabled by default] Fixes: 355b02eedc65 ("test/compress: add max mbuf size test case") Signed-off-by: Tomasz Jozwiak --- 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..a1b8649 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; 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