Alexander Goncharov has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/67700 )
Change subject: stlinkv3_spi: fix uninitialized pointer ......................................................................
stlinkv3_spi: fix uninitialized pointer
If we compile flashrom using meson build system, the compiler will fail due to -Werror=maybe-uninitialized. Let's initialize the pointer to NULL as suggested by the compiler compiler.
TEST=`meson out && ninja -C out`
Change-Id: Ibaf25f67186724d9045ade849026782c3eac4952 Signed-off-by: Alexander Goncharov chat@joursoir.net --- M stlinkv3_spi.c 1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/00/67700/1
diff --git a/stlinkv3_spi.c b/stlinkv3_spi.c index 38fe9f9..8dc0cb3 100644 --- a/stlinkv3_spi.c +++ b/stlinkv3_spi.c @@ -482,7 +482,7 @@ int ret = 1; int devIndex = 0; struct libusb_context *usb_ctx; - libusb_device_handle *stlinkv3_handle; + libusb_device_handle *stlinkv3_handle = NULL; struct stlinkv3_spi_data *stlinkv3_data;
if (libusb_init(&usb_ctx)) {