diff options
author | Josh Blum <josh@joshknows.com> | 2011-07-25 17:49:30 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-07-25 17:49:30 -0700 |
commit | ddbada4e64fe4117a0777b7a3d12a1a527991511 (patch) | |
tree | 4310a46d8ef772998ac8d9e1f7f9d6648a02ec74 /host/lib/usrp | |
parent | eaff1b3db4aee0ffb0a0af143d9df545f11f0f3f (diff) | |
download | uhd-ddbada4e64fe4117a0777b7a3d12a1a527991511.tar.gz uhd-ddbada4e64fe4117a0777b7a3d12a1a527991511.tar.bz2 uhd-ddbada4e64fe4117a0777b7a3d12a1a527991511.zip |
uhd: fixed some warnings with gcc on macosx
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/common/fx2_ctrl.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/cores/i2c_core_100.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/usrp/common/fx2_ctrl.cpp b/host/lib/usrp/common/fx2_ctrl.cpp index 8f2206221..650fba784 100644 --- a/host/lib/usrp/common/fx2_ctrl.cpp +++ b/host/lib/usrp/common/fx2_ctrl.cpp @@ -243,7 +243,7 @@ public: const std::streamsize n = file.gcount(); if(n == 0) continue; int ret = usrp_control_write(VRQ_FPGA_LOAD, 0, FL_XFER, buf, boost::uint16_t(n)); - if (ret < 0 or size_t(ret) != n) { + if (ret < 0 or std::streamsize(ret) != n) { throw uhd::io_error("usrp_load_fpga: fpga load error"); } } diff --git a/host/lib/usrp/cores/i2c_core_100.cpp b/host/lib/usrp/cores/i2c_core_100.cpp index 12352f108..ceeb3f518 100644 --- a/host/lib/usrp/cores/i2c_core_100.cpp +++ b/host/lib/usrp/cores/i2c_core_100.cpp @@ -99,7 +99,9 @@ public: byte_vector_t bytes; if (num_bytes == 0) return bytes; - while (_iface->peek16(REG_I2C_CMD_STATUS) & I2C_ST_BUSY); + while (_iface->peek16(REG_I2C_CMD_STATUS) & I2C_ST_BUSY){ + /* NOP */ + } _iface->poke16(REG_I2C_DATA, (addr << 1) | 1); //addr and read bit (1) _iface->poke16(REG_I2C_CMD_STATUS, I2C_CMD_WR | I2C_CMD_START); |