[Qemu-devel] [PATCH for 4.1 2/4] target/mips: Add missing 'break' for a case of MTHC0 handling

Aleksandar Markovic posted 4 patches 6 years, 7 months ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Aleksandar Markovic <amarkovic@wavecomp.com>, Aurelien Jarno <aurelien@aurel32.net>, Riku Voipio <riku.voipio@iki.fi>, Aleksandar Rikalo <arikalo@wavecomp.com>
[Qemu-devel] [PATCH for 4.1 2/4] target/mips: Add missing 'break' for a case of MTHC0 handling
Posted by Aleksandar Markovic 6 years, 7 months ago
From: Aleksandar Markovic <amarkovic@wavecomp.com>

This was found by GCC 8.3 static analysis.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
 target/mips/translate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/mips/translate.c b/target/mips/translate.c
index 2be5e2d..59d4acd 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -6745,6 +6745,7 @@ static void gen_mthc0(DisasContext *ctx, TCGv arg, int reg, int sel)
         default:
             goto cp0_unimplemented;
         }
+        break;
     case CP0_REGISTER_17:
         switch (sel) {
         case 0:
-- 
2.7.4


Re: [Qemu-devel] [PATCH for 4.1 2/4] target/mips: Add missing 'break' for a case of MTHC0 handling
Posted by Philippe Mathieu-Daudé 6 years, 7 months ago
Hi Aleksandar,

On 7/12/19 1:37 PM, Aleksandar Markovic wrote:
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
> 
> This was found by GCC 8.3 static analysis.
> 

I think you can amend:

Fixes: 5fb2dcd1792
Reported-by: Stefan Weil <sw@weilnetz.de>

> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> ---
>  target/mips/translate.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/mips/translate.c b/target/mips/translate.c
> index 2be5e2d..59d4acd 100644
> --- a/target/mips/translate.c
> +++ b/target/mips/translate.c
> @@ -6745,6 +6745,7 @@ static void gen_mthc0(DisasContext *ctx, TCGv arg, int reg, int sel)
>          default:
>              goto cp0_unimplemented;
>          }
> +        break;
>      case CP0_REGISTER_17:
>          switch (sel) {
>          case 0:
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Thanks,

Phil.

Re: [Qemu-devel]?==?utf-8?q? ?==?utf-8?q? [PATCH for 4.1?==?utf-8?q? 2/4]?==?utf-8?q? target/mips: Add missing 'break' for a case of MTHC0 handling
Posted by Aleksandar Markovic 6 years, 7 months ago
> From: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> > From: Aleksandar Markovic <amarkovic@wavecomp.com>
> >
> > This was found by GCC 8.3 static analysis.
> >
> 
> I think you can amend:
> 
> Fixes: 5fb2dcd1792
> Reported-by: Stefan Weil <sw@weilnetz.de>
>

Yes, indeed. This will be added in the next version.

Thanks,
Aleksandar