From a12fc913a078c6c2cf16787e64f4f24d448ff2f6 Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Mon, 19 Dec 2016 16:28:16 -0800 Subject: lib: add default ctors to structs and initialize members properly --- host/lib/usrp/e300/e300_global_regs.hpp | 1 + host/lib/usrp/e300/e300_i2c.hpp | 1 + host/lib/usrp/e300/e300_impl.hpp | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/e300') diff --git a/host/lib/usrp/e300/e300_global_regs.hpp b/host/lib/usrp/e300/e300_global_regs.hpp index 3b6b26239..c56cff298 100644 --- a/host/lib/usrp/e300/e300_global_regs.hpp +++ b/host/lib/usrp/e300/e300_global_regs.hpp @@ -24,6 +24,7 @@ namespace uhd { namespace usrp { namespace e300 { struct global_regs_transaction_t { + global_regs_transaction_t(): is_poke(0), addr(0), data(0), pad(0) {} uint32_t is_poke; uint32_t addr; uint32_t data; diff --git a/host/lib/usrp/e300/e300_i2c.hpp b/host/lib/usrp/e300/e300_i2c.hpp index 98a1f80aa..1c5e06bba 100644 --- a/host/lib/usrp/e300/e300_i2c.hpp +++ b/host/lib/usrp/e300/e300_i2c.hpp @@ -27,6 +27,7 @@ namespace uhd { namespace usrp { namespace e300 { struct i2c_transaction_t { + i2c_transaction_t(): reg(0), addr(0), data(0), type(0) {}; uint16_t reg; uint8_t addr; uint8_t data; diff --git a/host/lib/usrp/e300/e300_impl.hpp b/host/lib/usrp/e300/e300_impl.hpp index 632424438..50d78fdd4 100644 --- a/host/lib/usrp/e300/e300_impl.hpp +++ b/host/lib/usrp/e300/e300_impl.hpp @@ -189,7 +189,8 @@ private: // types { gpio_t() : pps_sel(global_regs::PPS_INT), mimo(0), codec_arst(0), tx_bandsels(0), - rx_bandsel_a(0), rx_bandsel_b(0), rx_bandsel_c(0) + rx_bandsel_a(0), rx_bandsel_b(0), rx_bandsel_c(0), + time_sync(0) {} uint32_t pps_sel; -- cgit v1.2.3