[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-i386: Remove unused local_err variable
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] target-i386: Remove unused local_err variable |
Date: |
Mon, 28 Nov 2016 08:31:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eduardo Habkost <address@hidden> writes:
> local_err can never be set to non-NULL. Remove the variable.
>
> Detected by Coverity:
>
> *** CID 1365201: Possible Control flow issues (DEADCODE)
> /target-i386/cpu.c: 2050 in x86_cpu_parse_featurestr()
> 2044 prop->value = g_strdup(val);
> 2045 prop->errp = &error_fatal;
> 2046 qdev_prop_register_global(prop);
> 2047 }
> 2048
> 2049 if (local_err) {
> >>> CID 1365201: Possible Control flow issues (DEADCODE)
> >>> Execution cannot reach this statement: "error_propagate(errp,
> local...".
> 2050 error_propagate(errp, local_err);
> 2051 }
> 2052 }
> 2053
> 2054 static void x86_cpu_load_features(X86CPU *cpu, Error **errp);
> 2055 static int x86_cpu_filter_features(X86CPU *cpu);
>
> Reported-by: Markus Armbruster <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>