From eb28f1b7b2c89a9986e799adcfffe2e2fc9c72b6 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Sat, 5 Apr 2014 17:42:33 +0200 Subject: [PATCH] fx2lafw: fix possible use of uninitialized variable (gcc-4.9 warning fix) hardware/fx2lafw/protocol.c: In function 'fx2lafw_command_start_acquisition': hardware/fx2lafw/protocol.c:113:7: warning: 'cmd.flags' may be used uninitialized in this function [-Wmaybe-uninitialized] (cmd.flags & CMD_START_FLAGS_CLK_48MHZ) ? "48" : "30"); ^ --- hardware/fx2lafw/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/fx2lafw/protocol.c b/hardware/fx2lafw/protocol.c index f4f23e37..a19b3243 100644 --- a/hardware/fx2lafw/protocol.c +++ b/hardware/fx2lafw/protocol.c @@ -87,7 +87,7 @@ static int command_get_revid_version(libusb_device_handle *devhdl, SR_PRIV int fx2lafw_command_start_acquisition(libusb_device_handle *devhdl, uint64_t samplerate, gboolean samplewide) { - struct cmd_start_acquisition cmd; + struct cmd_start_acquisition cmd = { 0 }; int delay = 0, ret; /* Compute the sample rate. */