ALSA: hda: generic: Remove redundant assignment to dac
PATCH v2 1/1 ALSA: hda: generic: Remove redundant assignment to dac
Variable dac is set to zero, but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed.
Clean up the following clang-analyzer warning:
sound/pci/hda/hda_generic.c:1436:4: warning: Value stored to 'dac' is never read [clang-analyzer-deadcode.DeadStores].
---
Changes in v2:
-For the follow advice: https://lore.kernel.org/patchwork/patch/1423536/
sound/pci/hda/hda_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/hda_generic.c +1 -1
@@ -1433,7 +1433,7 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs, path =snd_hda_add_new_path (codec, dac, pin,0 ); }if (!path) { - dac = dacs[i] =0 ; + dacs[i] =0 ; badness += bad->no_dac; }else {/* print_nid_path(codec, "output", path); */
Signature · 1 line
1.8.3.1
Takashi Iwai
AppliedQuoted 7 lines · Jiapeng Chong
Variable dac is set to zero, but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed.
Clean up the following clang-analyzer warning:
Quoted 8 lines
sound/pci/hda/hda_generic.c:1436:4: warning: Value stored to 'dac' is never read [clang-analyzer-deadcode.DeadStores].Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>---
Changes in v2:
-For the follow advice: https://lore.kernel.org/patchwork/patch/1423536/
Thanks, applied.
Takashi