aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2013-12-06 18:19:25 -0800
committerMichael West <michael.west@ettus.com>2013-12-06 18:19:25 -0800
commite8df47ba90d5be385071ebe84645d1501995875a (patch)
treec42b85bd9eebd67522244ca4f67a6ccd470100d8
parentc3aa7326095a1a8c744e269a04572de74600df8d (diff)
downloaduhd-e8df47ba90d5be385071ebe84645d1501995875a.tar.gz
uhd-e8df47ba90d5be385071ebe84645d1501995875a.tar.bz2
uhd-e8df47ba90d5be385071ebe84645d1501995875a.zip
Fix sse2_fc32_to_sc16 converter (break on wrong line). Fix typos and compiler warnings.
-rw-r--r--host/lib/convert/sse2_fc32_to_sc16.cpp2
-rw-r--r--host/lib/usrp/b200/b200_iface.cpp6
-rw-r--r--host/lib/usrp/common/fx2_ctrl.cpp4
3 files changed, 5 insertions, 7 deletions
diff --git a/host/lib/convert/sse2_fc32_to_sc16.cpp b/host/lib/convert/sse2_fc32_to_sc16.cpp
index a83e9b46c..69786d7ce 100644
--- a/host/lib/convert/sse2_fc32_to_sc16.cpp
+++ b/host/lib/convert/sse2_fc32_to_sc16.cpp
@@ -103,6 +103,7 @@ DECLARE_CONVERTER(fc32, 1, sc16_item32_be, 1, PRIORITY_SIMD){
case 0x0:
// the data is 16-byte aligned, so do the fast processing of the bulk of the samples
convert_fc32_1_to_item32_1_bswap_guts(_)
+ break;
case 0x8:
// the first value is 8-byte aligned - process it and prepare the bulk of the data for fast conversion
xx_to_item32_sc16<uhd::htonx>(input, output, 1, scale_factor);
@@ -110,7 +111,6 @@ DECLARE_CONVERTER(fc32, 1, sc16_item32_be, 1, PRIORITY_SIMD){
// do faster processing of the remaining samples now that we are 16-byte aligned
convert_fc32_1_to_item32_1_bswap_guts(_)
break;
- break;
default:
// we are not 8 or 16-byte aligned, so do fast processing with the unaligned load
convert_fc32_1_to_item32_1_bswap_guts(u_)
diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp
index 5361ecaa0..1f38978da 100644
--- a/host/lib/usrp/b200/b200_iface.cpp
+++ b/host/lib/usrp/b200/b200_iface.cpp
@@ -171,9 +171,6 @@ bool parse_record(const std::string& record, boost::uint16_t &len, \
if (len > (2 * (record.length() - 9))) // sanity check to prevent buffer overrun
return false;
- if (len > (2 * (record->length() - 9))) // sanity check to prevent buffer overrun
- return false;
-
for (i = 0; i < len; i++) {
std::istringstream(record.substr(9 + 2 * i, 2)) >> std::hex >> val;
data[i] = (unsigned char) val;
@@ -459,13 +456,14 @@ public:
void set_fpga_reset_pin(const bool reset) {
unsigned char data[4];
memset(data, (reset)? 0xFF : 0x00, sizeof(data));
- const int bytes_to_send = sizeof(data);
UHD_THROW_INVALID_CODE_PATH();
// Below is dead code as long as UHD_THROW_INVALID_CODE_PATH(); is declared above.
// It is preserved here in a comment in case it is needed later:
/*
+ const int bytes_to_send = sizeof(data);
+
int ret = fx3_control_write(B200_VREQ_FPGA_RESET, 0x00, 0x00, data, bytes_to_send);
if (ret < 0)
throw uhd::io_error((boost::format("Failed to reset FPGA (%d: %s)") % ret % libusb_error_name(ret)).str());
diff --git a/host/lib/usrp/common/fx2_ctrl.cpp b/host/lib/usrp/common/fx2_ctrl.cpp
index d68bf6058..6552f1b2d 100644
--- a/host/lib/usrp/common/fx2_ctrl.cpp
+++ b/host/lib/usrp/common/fx2_ctrl.cpp
@@ -184,8 +184,8 @@ public:
std::string record;
file >> record;
- if (!(record.length() > 0))
- continue;
+ if (!(record.length() > 0))
+ continue;
//check for valid record
if (not checksum(&record) or not parse_record(&record, len, addr, type, data)) {