From 92fc1864509b6528c3756bfcd385bfb23fb7a28e Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Thu, 20 Sep 2018 16:17:16 +0700 Subject: device/lms/LMSDevice.cpp: fix compilation warning The following warning was observed with GCC 4.8.5: make[4]: Entering directory `.../osmo-trx/Transceiver52M/device/lms' CXX LMSDevice.lo LMSDevice.cpp: In member function 'LMSDevice::writeSamples()': LMSDevice.cpp:582:22: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized] samplesWritten += rc; Let's fix this by zero-initializing 'rc'. Change-Id: I4b4a061fc12e5fd1db8d1087d8e0c46ff1e23412 --- Transceiver52M/device/lms/LMSDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Transceiver52M/device') diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index d8220ea..32c3d15 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -543,7 +543,7 @@ int LMSDevice::writeSamples(std::vector < short *>&bufs, int len, bool * underrun, unsigned long long timestamp, bool isControl) { - int rc; + int rc = 0; unsigned int i; lms_stream_status_t status; lms_stream_meta_t tx_metadata = {}; -- cgit v1.2.3