diff options
author | Josh Blum <josh@joshknows.com> | 2012-02-09 19:02:43 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-02-09 19:02:43 -0800 |
commit | 8442ea5e2cfec89db6e58736a969da2842734631 (patch) | |
tree | 624301099581ea0794d88a61007bdf3418182d1d /host/lib/usrp/b100 | |
parent | 115100034071b3b58de1fce7c795995f6ee615a1 (diff) | |
download | uhd-8442ea5e2cfec89db6e58736a969da2842734631.tar.gz uhd-8442ea5e2cfec89db6e58736a969da2842734631.tar.bz2 uhd-8442ea5e2cfec89db6e58736a969da2842734631.zip |
b100/usrp1: various tweaks for compiler warns and valgrind
Diffstat (limited to 'host/lib/usrp/b100')
-rw-r--r-- | host/lib/usrp/b100/b100_ctrl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/b100/b100_ctrl.cpp b/host/lib/usrp/b100/b100_ctrl.cpp index 7d40daa32..e6136c00e 100644 --- a/host/lib/usrp/b100/b100_ctrl.cpp +++ b/host/lib/usrp/b100/b100_ctrl.cpp @@ -165,7 +165,7 @@ int b100_ctrl_impl::write(boost::uint32_t addr, const ctrl_data_t &data) { pkt.pkt_meta.seq = _seq++; pkt.pkt_meta.len = pkt.data.size(); pkt.pkt_meta.addr = addr; - boost::uint16_t pkt_buff[CTRL_PACKET_LENGTH / sizeof(boost::uint16_t)]; + boost::uint16_t pkt_buff[CTRL_PACKET_LENGTH / sizeof(boost::uint16_t)] = {}; pack_ctrl_pkt(pkt_buff, pkt); size_t result = send_pkt(pkt_buff); @@ -181,7 +181,7 @@ ctrl_data_t b100_ctrl_impl::read(boost::uint32_t addr, size_t len) { pkt.pkt_meta.seq = _seq++; pkt.pkt_meta.len = len; pkt.pkt_meta.addr = addr; - boost::uint16_t pkt_buff[CTRL_PACKET_LENGTH / sizeof(boost::uint16_t)]; + boost::uint16_t pkt_buff[CTRL_PACKET_LENGTH / sizeof(boost::uint16_t)] = {}; //flush anything that might be in the queue while (get_ctrl_data(pkt.data, 0.0)){ |