Attention is currently required from: Felix Singer, Thomas Heijligen, Angel Pons, Anastasia Klimchuk.

Alexander Goncharov uploaded patch set #2 to this change.

View Change

stlinkv3_spi: fix uninitialized pointer

`stlinkv3_handle` declared without an initial value. The variable is
initialized in a branch which can only be accessed if
`devs_stlinkv3_spi[0].vendor_id != 0`. Otherwise, the variable contains
a garbage value. We can consider this case as a false positive because
`devs_stlinkv3_spi` holds as a minimum one device entry (otherwise we
wouldn't need a driver).

This issue was found by setting compiler flag `-Og`, which optimizes
debugging experience, and running scan-build. So, we have to fix it
to allow the compiler to use the flag and remove the warning from the
scan-build list.

Change-Id: Ibaf25f67186724d9045ade849026782c3eac4952
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
---
M stlinkv3_spi.c
1 file changed, 24 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/00/67700/2

To view, visit change 67700. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ibaf25f67186724d9045ade849026782c3eac4952
Gerrit-Change-Number: 67700
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Goncharov <chat@joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Miklós Márton <martonmiklosqdev@gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus@gmail.com>
Gerrit-CC: Felix Singer <felixsinger@posteo.net>
Gerrit-Attention: Felix Singer <felixsinger@posteo.net>
Gerrit-Attention: Thomas Heijligen <src@posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: newpatchset