app/test-compress-perf: fix reliance on integer endianness (CI:328524)
PATCH 1/1 app/test-compress-perf: fix reliance on integer endianness (CI:328524)
This patch fixes Coverity Issue 328524:
Reliance on integer endianness (INCOMPATIBLE_CAST) in function *parse_window_sz*.
--- app/test-compress-perf/comp_perf_options_parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
app/test-compress-perf/comp_perf_options_parse.c +3 -1
@@ -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 ; }
Signature · 1 line
2.17.1
Quoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Artur Trybula
Sent: Monday, June 3, 2019 2:51 PM
To: [email protected]; Trahe, Fiona <[email protected]>; Trybula, ArturX <[email protected]>; Dybkowski, AdamX <[email protected]>
Subject: [dpdk-dev] [PATCH] app/test-compress-perf: fix reliance on integer endianness (CI:328524)
Quoted 3 lines
This patch fixes Coverity Issue 328524:
Reliance on integer endianness (INCOMPATIBLE_CAST) in function *parse_window_sz*.
This patch should have a fixes line. The usual message would include:
Fixes: e0b6287c035d ("app/compress-perf: add parser")
Coverity issue: 328524John
v2 cover app/test-compress-perf: fix reliance on integer endianness
In reply to Artur Trybulav2:
* add 'fixes' line to the patch description
Artur Trybula (1):
app/test-compress-perf: fix reliance on integer endianness (CI:328524)
app/test-compress-perf/comp_perf_options_parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.17.1
PATCH v2 1/1 app/test-compress-perf: fix reliance on integer endianness
This patch fixes Coverity Issue 328524:
Reliance on integer endianness (INCOMPATIBLE_CAST) in function *parse_window_sz*.
Coverity issue: 328524
--- app/test-compress-perf/comp_perf_options_parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
app/test-compress-perf/comp_perf_options_parse.c +3 -1
@@ -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 ; }
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2 1/1] app/test-compress-perf: fix reliance on integer endianness
Quoted 14 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Artur Trybula
Sent: Tuesday, June 4, 2019 6:11 PM
To: [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH v2 1/1] app/test-compress-perf: fix reliance on integer endiannessThis patch fixes Coverity Issue 328524:
Reliance on integer endianness (INCOMPATIBLE_CAST) in function *parse_window_sz*.
Quoted 5 lines
Coverity issue: 328524
Fixes e0b6287c035d ("app/compress-perf: add parser")Signed-off-by Artur Trybula <[email protected]>---
Shally
Akhil Goyal
AppliedRe: [dpdk-dev] [PATCH v2 1/1] app/test-compress-perf: fix reliance on integer endianness
Quoted 7 lines
Quoted 7 lines
This patch fixes Coverity Issue 328524:
Reliance on integer endianness (INCOMPATIBLE_CAST) in function *parse_window_sz*.
Quoted 7 lines
Quoted 5 lines
Coverity issue: 328524
Fixes e0b6287c035d ("app/compress-perf: add parser")Signed-off-by Artur Trybula <[email protected]>---
Acked-by Shally Verma <[email protected]>
Applied to dpdk-next-crypto
Thanks.