diff mbox

[2/3] test: validation: classification: unused variable

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

Commit Message

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

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

Comments

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

> retval is not used, remove it
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>  test/validation/classification/odp_classification_tests.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/validation/classification/odp_classification_tests.c
> b/test/validation/classification/odp_classification_tests.c
> index 0e0c4eb..827afa4 100644
> --- a/test/validation/classification/odp_classification_tests.c
> +++ b/test/validation/classification/odp_classification_tests.c
> @@ -405,7 +405,7 @@ void configure_cls_pmr_chain(void)
>                                                      &qparam);
>         CU_ASSERT_FATAL(queue_list[CLS_PMR_CHAIN_DST] !=
> ODP_QUEUE_INVALID);
>
> -       retval = odp_cos_set_queue(cos_list[CLS_PMR_CHAIN_DST],
> +       odp_cos_set_queue(cos_list[CLS_PMR_CHAIN_DST],
>                                    queue_list[CLS_PMR_CHAIN_DST]);
>

Again the issue here is not that retval is unused but that what's missing
is the following:

CU_ASSERT(retval == 0);

>
>         parse_ipv4_string(CLS_PMR_CHAIN_SADDR, &addr, &mask);
> --
> 2.1.4
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Balasubramanian Manoharan Aug. 14, 2015, 6:23 a.m. UTC | #2
I agree with Bill. retval should be tested for success in this case.

Regards,
Bala

On 14 August 2015 at 01:24, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

>
>
> On Thu, Aug 13, 2015 at 2:04 PM, Mike Holmes <mike.holmes@linaro.org>
> wrote:
>
>> retval is not used, remove it
>>
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>> ---
>>  test/validation/classification/odp_classification_tests.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/test/validation/classification/odp_classification_tests.c
>> b/test/validation/classification/odp_classification_tests.c
>> index 0e0c4eb..827afa4 100644
>> --- a/test/validation/classification/odp_classification_tests.c
>> +++ b/test/validation/classification/odp_classification_tests.c
>> @@ -405,7 +405,7 @@ void configure_cls_pmr_chain(void)
>>                                                      &qparam);
>>         CU_ASSERT_FATAL(queue_list[CLS_PMR_CHAIN_DST] !=
>> ODP_QUEUE_INVALID);
>>
>> -       retval = odp_cos_set_queue(cos_list[CLS_PMR_CHAIN_DST],
>> +       odp_cos_set_queue(cos_list[CLS_PMR_CHAIN_DST],
>>                                    queue_list[CLS_PMR_CHAIN_DST]);
>>
>
> Again the issue here is not that retval is unused but that what's missing
> is the following:
>
> CU_ASSERT(retval == 0);
>
>>
>>         parse_ipv4_string(CLS_PMR_CHAIN_SADDR, &addr, &mask);
>> --
>> 2.1.4
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
Mike Holmes Aug. 14, 2015, 2:58 p.m. UTC | #3
Thanks will generate additional tests

On 14 August 2015 at 02:23, Bala Manoharan <bala.manoharan@linaro.org>
wrote:

> I agree with Bill. retval should be tested for success in this case.
>
> Regards,
> Bala
>
> On 14 August 2015 at 01:24, Bill Fischofer <bill.fischofer@linaro.org>
> wrote:
>
>>
>>
>> On Thu, Aug 13, 2015 at 2:04 PM, Mike Holmes <mike.holmes@linaro.org>
>> wrote:
>>
>>> retval is not used, remove it
>>>
>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>>> ---
>>>  test/validation/classification/odp_classification_tests.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/test/validation/classification/odp_classification_tests.c
>>> b/test/validation/classification/odp_classification_tests.c
>>> index 0e0c4eb..827afa4 100644
>>> --- a/test/validation/classification/odp_classification_tests.c
>>> +++ b/test/validation/classification/odp_classification_tests.c
>>> @@ -405,7 +405,7 @@ void configure_cls_pmr_chain(void)
>>>                                                      &qparam);
>>>         CU_ASSERT_FATAL(queue_list[CLS_PMR_CHAIN_DST] !=
>>> ODP_QUEUE_INVALID);
>>>
>>> -       retval = odp_cos_set_queue(cos_list[CLS_PMR_CHAIN_DST],
>>> +       odp_cos_set_queue(cos_list[CLS_PMR_CHAIN_DST],
>>>                                    queue_list[CLS_PMR_CHAIN_DST]);
>>>
>>
>> Again the issue here is not that retval is unused but that what's missing
>> is the following:
>>
>> CU_ASSERT(retval == 0);
>>
>>>
>>>         parse_ipv4_string(CLS_PMR_CHAIN_SADDR, &addr, &mask);
>>> --
>>> 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/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c
index 0e0c4eb..827afa4 100644
--- a/test/validation/classification/odp_classification_tests.c
+++ b/test/validation/classification/odp_classification_tests.c
@@ -405,7 +405,7 @@  void configure_cls_pmr_chain(void)
 						     &qparam);
 	CU_ASSERT_FATAL(queue_list[CLS_PMR_CHAIN_DST] != ODP_QUEUE_INVALID);
 
-	retval = odp_cos_set_queue(cos_list[CLS_PMR_CHAIN_DST],
+	odp_cos_set_queue(cos_list[CLS_PMR_CHAIN_DST],
 				   queue_list[CLS_PMR_CHAIN_DST]);
 
 	parse_ipv4_string(CLS_PMR_CHAIN_SADDR, &addr, &mask);