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 DF417A0096 for ; Tue, 4 Jun 2019 14:41:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F16E1BBF2; Tue, 4 Jun 2019 14:41:08 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BEFA51B9E2 for ; Tue, 4 Jun 2019 14:41:05 +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 orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2019 05:41:05 -0700 X-ExtLoop1: 1 Received: from atrybulx-mobl.ger.corp.intel.com (HELO build-VirtualBox.isw.intel.com) ([10.103.104.101]) by orsmga002.jf.intel.com with ESMTP; 04 Jun 2019 05:41:03 -0700 From: Artur Trybula To: dev@dpdk.org, fiona.trahe@intel.com, adamx.dybkowski@intel.com, arturx.trybula@intel.com Date: Tue, 4 Jun 2019 14:41:01 +0200 Message-Id: <20190604124101.28116-2-arturx.trybula@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190604124101.28116-1-arturx.trybula@intel.com> References: <20190603135046.26572-1-arturx.trybula@intel.com> <20190604124101.28116-1-arturx.trybula@intel.com> Subject: [dpdk-dev] [PATCH v2 1/1] app/test-compress-perf: fix reliance on integer endianness 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" This patch fixes Coverity Issue 328524: Reliance on integer endianness (INCOMPATIBLE_CAST) in function *parse_window_sz*. Coverity issue: 328524 Fixes: e0b6287c035d ("app/compress-perf: add parser") Signed-off-by: Artur Trybula --- app/test-compress-perf/comp_perf_options_parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test-compress-perf/comp_perf_options_parse.c index 2fb6fb48a..a7a8c1f9e 100644 --- a/app/test-compress-perf/comp_perf_options_parse.c +++ b/app/test-compress-perf/comp_perf_options_parse.c @@ -364,12 +364,14 @@ parse_max_num_sgl_segs(struct comp_test_data *test_data, const char *arg) static int parse_window_sz(struct comp_test_data *test_data, const char *arg) { - int ret = parse_uint16_t((uint16_t *)&test_data->window_sz, arg); + uint16_t tmp; + int ret = parse_uint16_t(&tmp, arg); if (ret) { RTE_LOG(ERR, USER1, "Failed to parse window size\n"); return -1; } + test_data->window_sz = (int)tmp; return 0; } -- 2.17.1