qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/hexagon: fix = vs. == mishap


From: Anton Johansson
Subject: Re: [PATCH] target/hexagon: fix = vs. == mishap
Date: Thu, 27 Apr 2023 18:21:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0


On 4/27/23 14:56, Paolo Bonzini wrote:
Coverity reports a parameter that is "set but never used".  This is caused
by an assignment operator being used instead of equality.

Cc: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  target/hexagon/idef-parser/parser-helpers.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/hexagon/idef-parser/parser-helpers.c 
b/target/hexagon/idef-parser/parser-helpers.c
index 86511efb62b9..0a01ec39b75e 100644
--- a/target/hexagon/idef-parser/parser-helpers.c
+++ b/target/hexagon/idef-parser/parser-helpers.c
@@ -1123,7 +1123,7 @@ HexValue gen_extend_op(Context *c,
                         HexValue *value,
                         HexSignedness signedness)
  {
-    unsigned bit_width = (dst_width = 64) ? 64 : 32;
+    unsigned bit_width = (dst_width == 64) ? 64 : 32;
      HexValue value_m = *value;
      HexValue src_width_m = *src_width;
Reviewed-by: Anton Johansson <anjo@rev.ng>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]