diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-09-20 16:17:16 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-09-20 16:17:19 +0700 |
commit | 92fc1864509b6528c3756bfcd385bfb23fb7a28e (patch) | |
tree | 460acec3ffadf526be5e4fd9aa6308fd04d0416f /Transceiver52M | |
parent | 4d179abfd01268c2db42ec4f1d6ebb83539d7e25 (diff) |
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
Diffstat (limited to 'Transceiver52M')
-rw-r--r-- | Transceiver52M/device/lms/LMSDevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 = {}; |