target/hexagon/idef-parser/idef-parser.y | 1 - 1 file changed, 1 deletion(-)
The self assignment is clearly useless, and @1.last_column does not have
to be set for an expression with only a single token, so remove it.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
---
target/hexagon/idef-parser/idef-parser.y | 1 -
1 file changed, 1 deletion(-)
diff --git a/target/hexagon/idef-parser/idef-parser.y b/target/hexagon/idef-parser/idef-parser.y
index cd2612eb8c..a6587f5bcc 100644
--- a/target/hexagon/idef-parser/idef-parser.y
+++ b/target/hexagon/idef-parser/idef-parser.y
@@ -802,7 +802,6 @@ rvalue : FAIL
lvalue : FAIL
{
- @1.last_column = @1.last_column;
yyassert(c, &@1, false, "Encountered a FAIL token as lvalue.\n");
}
| REG
--
2.41.0
> -----Original Message-----
> From: Anton Johansson <anjo@rev.ng>
> Sent: Thursday, July 13, 2023 7:09 AM
> To: qemu-devel@nongnu.org
> Cc: Brian Cain <bcain@quicinc.com>; peter.maydell@linaro.org
> Subject: [PATCH] target/hexagon/idef-parser: Remove self-assignment
>
> WARNING: This email originated from outside of Qualcomm. Please be wary of
> any links or attachments, and do not enable macros.
>
> The self assignment is clearly useless, and @1.last_column does not have
> to be set for an expression with only a single token, so remove it.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Anton Johansson <anjo@rev.ng>
> ---
> target/hexagon/idef-parser/idef-parser.y | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/target/hexagon/idef-parser/idef-parser.y b/target/hexagon/idef-
> parser/idef-parser.y
> index cd2612eb8c..a6587f5bcc 100644
> --- a/target/hexagon/idef-parser/idef-parser.y
> +++ b/target/hexagon/idef-parser/idef-parser.y
> @@ -802,7 +802,6 @@ rvalue : FAIL
>
> lvalue : FAIL
> {
> - @1.last_column = @1.last_column;
> yyassert(c, &@1, false, "Encountered a FAIL token as lvalue.\n");
> }
> | REG
> --
> 2.41.0
Reviewed-by: Brian Cain <bcain@quicinc.com>
On Thu, 13 Jul 2023 at 17:21, Brian Cain <bcain@quicinc.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Anton Johansson <anjo@rev.ng>
> > Sent: Thursday, July 13, 2023 7:09 AM
> > To: qemu-devel@nongnu.org
> > Cc: Brian Cain <bcain@quicinc.com>; peter.maydell@linaro.org
> > Subject: [PATCH] target/hexagon/idef-parser: Remove self-assignment
> >
> > WARNING: This email originated from outside of Qualcomm. Please be wary of
> > any links or attachments, and do not enable macros.
> >
> > The self assignment is clearly useless, and @1.last_column does not have
> > to be set for an expression with only a single token, so remove it.
> >
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Anton Johansson <anjo@rev.ng>
> > ---
> > target/hexagon/idef-parser/idef-parser.y | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/target/hexagon/idef-parser/idef-parser.y b/target/hexagon/idef-
> > parser/idef-parser.y
> > index cd2612eb8c..a6587f5bcc 100644
> > --- a/target/hexagon/idef-parser/idef-parser.y
> > +++ b/target/hexagon/idef-parser/idef-parser.y
> > @@ -802,7 +802,6 @@ rvalue : FAIL
> >
> > lvalue : FAIL
> > {
> > - @1.last_column = @1.last_column;
> > yyassert(c, &@1, false, "Encountered a FAIL token as lvalue.\n");
> > }
> > | REG
> > --
> > 2.41.0
>
> Reviewed-by: Brian Cain <bcain@quicinc.com>
Ping -- I just noticed that this patch never seems to have
made it upstream. Brian, could you pick it up?
(This fixes a Coverity issue: CID 976926.)
thanks
-- PMM
On 7/31/2024 12:07 PM, Peter Maydell wrote:
> On Thu, 13 Jul 2023 at 17:21, Brian Cain <bcain@quicinc.com> wrote:
>>
>>
>>> -----Original Message-----
>>> From: Anton Johansson <anjo@rev.ng>
>>> Sent: Thursday, July 13, 2023 7:09 AM
>>> To: qemu-devel@nongnu.org
>>> Cc: Brian Cain <bcain@quicinc.com>; peter.maydell@linaro.org
>>> Subject: [PATCH] target/hexagon/idef-parser: Remove self-assignment
>>>
>>> WARNING: This email originated from outside of Qualcomm. Please be wary of
>>> any links or attachments, and do not enable macros.
>>>
>>> The self assignment is clearly useless, and @1.last_column does not have
>>> to be set for an expression with only a single token, so remove it.
>>>
>>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>>> Signed-off-by: Anton Johansson <anjo@rev.ng>
>>> ---
>>> target/hexagon/idef-parser/idef-parser.y | 1 -
>>> 1 file changed, 1 deletion(-)
>>>
>>> diff --git a/target/hexagon/idef-parser/idef-parser.y b/target/hexagon/idef-
>>> parser/idef-parser.y
>>> index cd2612eb8c..a6587f5bcc 100644
>>> --- a/target/hexagon/idef-parser/idef-parser.y
>>> +++ b/target/hexagon/idef-parser/idef-parser.y
>>> @@ -802,7 +802,6 @@ rvalue : FAIL
>>>
>>> lvalue : FAIL
>>> {
>>> - @1.last_column = @1.last_column;
>>> yyassert(c, &@1, false, "Encountered a FAIL token as lvalue.\n");
>>> }
>>> | REG
>>> --
>>> 2.41.0
>> Reviewed-by: Brian Cain <bcain@quicinc.com>
>
> Ping -- I just noticed that this patch never seems to have
> made it upstream. Brian, could you pick it up?
>
> (This fixes a Coverity issue: CID 976926.)
Sorry about that! Queued at https://github.com/quic/qemu/ hex.next --
will include it in an upcoming PR.
On 13/7/23 14:08, Anton Johansson via wrote: > The self assignment is clearly useless, and @1.last_column does not have > to be set for an expression with only a single token, so remove it. > > Reported-by: Peter Maydell <peter.maydell@linaro.org> > Signed-off-by: Anton Johansson <anjo@rev.ng> > --- > target/hexagon/idef-parser/idef-parser.y | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
© 2016 - 2026 Red Hat, Inc.