diff mbox

[1/3] test: validation: mask_common: remove unused variable

Message ID 1439492682-9226-1-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Aug. 13, 2015, 7:04 p.m. UTC
str_sz is not used, remove it

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 test/validation/common/mask_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bill Fischofer Aug. 13, 2015, 7:41 p.m. UTC | #1
On Thu, Aug 13, 2015 at 2:04 PM, Mike Holmes <mike.holmes@linaro.org> wrote:

> str_sz is not used, remove it
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  test/validation/common/mask_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/validation/common/mask_common.c
> b/test/validation/common/mask_common.c
> index fce7725..119c2bb 100644
> --- a/test/validation/common/mask_common.c
> +++ b/test/validation/common/mask_common.c
> @@ -143,7 +143,7 @@ MASK_TESTFUNC(to_from_str)
>         /* check for handling of missing "0x" prefix: */
>         _odp_mask_from_str(&mask, TEST_MASK_0_NO_PREFIX);
>
> -       str_sz = _odp_mask_to_str(&mask, buf_out,
> +       _odp_mask_to_str(&mask, buf_out,
>                                   stringlen(TEST_MASK_0) + 1);
>
>         CU_ASSERT_NSTRING_EQUAL(buf_out, TEST_MASK_0,
> --
> 2.1.4
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Bill Fischofer Aug. 13, 2015, 7:52 p.m. UTC | #2
Actually, let me rescind that reviewed-by.  See comments inline.

On Thu, Aug 13, 2015 at 2:41 PM, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

>
>
> On Thu, Aug 13, 2015 at 2:04 PM, Mike Holmes <mike.holmes@linaro.org>
> wrote:
>
>> str_sz is not used, remove it
>>
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
>
>
>> ---
>>  test/validation/common/mask_common.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/test/validation/common/mask_common.c
>> b/test/validation/common/mask_common.c
>> index fce7725..119c2bb 100644
>> --- a/test/validation/common/mask_common.c
>> +++ b/test/validation/common/mask_common.c
>> @@ -143,7 +143,7 @@ MASK_TESTFUNC(to_from_str)
>>         /* check for handling of missing "0x" prefix: */
>>         _odp_mask_from_str(&mask, TEST_MASK_0_NO_PREFIX);
>>
>> -       str_sz = _odp_mask_to_str(&mask, buf_out,
>> +       _odp_mask_to_str(&mask, buf_out,
>>                                   stringlen(TEST_MASK_0) + 1);
>>
>>
The real issue here is not that str_sz is unused but that it isn't
checked.  It should be followed by a
CU_ASSERT(str_sz  == (int32_t)stringlen(TEST_MASK_0) + 1);


>         CU_ASSERT_NSTRING_EQUAL(buf_out, TEST_MASK_0,
>> --
>> 2.1.4
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
diff mbox

Patch

diff --git a/test/validation/common/mask_common.c b/test/validation/common/mask_common.c
index fce7725..119c2bb 100644
--- a/test/validation/common/mask_common.c
+++ b/test/validation/common/mask_common.c
@@ -143,7 +143,7 @@  MASK_TESTFUNC(to_from_str)
 	/* check for handling of missing "0x" prefix: */
 	_odp_mask_from_str(&mask, TEST_MASK_0_NO_PREFIX);
 
-	str_sz = _odp_mask_to_str(&mask, buf_out,
+	_odp_mask_to_str(&mask, buf_out,
 				  stringlen(TEST_MASK_0) + 1);
 
 	CU_ASSERT_NSTRING_EQUAL(buf_out, TEST_MASK_0,