diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2014-08-21 16:45:52 -0700 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2014-10-10 17:49:09 -0700 |
commit | 2d2ac40b077fbff2dd4886f22125742825aaa8fb (patch) | |
tree | e4c04b51969fabc426f11bafadf06e71ab236f74 /host/lib | |
parent | cca10287170e8ad50740791e7cbe715b642c2a87 (diff) | |
download | uhd-2d2ac40b077fbff2dd4886f22125742825aaa8fb.tar.gz uhd-2d2ac40b077fbff2dd4886f22125742825aaa8fb.tar.bz2 uhd-2d2ac40b077fbff2dd4886f22125742825aaa8fb.zip |
nirio: Made new nirio iface code compile with GCC
- Addressed GCC specific errors and warnings
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/transport/nirio/nirio_driver_iface_linux.cpp | 19 | ||||
-rw-r--r-- | host/lib/transport/nirio/niriok_proxy_impl_v2.cpp | 6 | ||||
-rw-r--r-- | host/lib/transport/nirio_zero_copy.cpp | 2 |
3 files changed, 13 insertions, 14 deletions
diff --git a/host/lib/transport/nirio/nirio_driver_iface_linux.cpp b/host/lib/transport/nirio/nirio_driver_iface_linux.cpp index cccf4f8f9..4afc1579f 100644 --- a/host/lib/transport/nirio/nirio_driver_iface_linux.cpp +++ b/host/lib/transport/nirio/nirio_driver_iface_linux.cpp @@ -27,15 +27,14 @@ namespace nirio_driver_iface { struct nirio_ioctl_block_t { - uint64_t inBuf; - uint64_t outBuf; - uint32_t inBufLength; - uint32_t outBufLength; - uint32_t bytesReturned; + uint64_t in_buf; + uint64_t out_buf; + uint32_t in_buf_len; + uint32_t out_buf_len; + uint32_t bytes_returned; uint32_t padding; }; - nirio_status rio_open( const std::string& device_path, rio_dev_handle_t& device_handle) @@ -66,10 +65,10 @@ nirio_status rio_ioctl( nirio_ioctl_block_t ioctl_block = {0,0,0,0,0,0}; // two-casts necessary to prevent pointer sign-extension - ioctl_block.inBuf = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(write_buf)); - ioctl_block.inBufLength = write_buf_len; - ioctl_block.outBuf = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(read_buf)); - ioctl_block.outBufLength = read_buf_len; + ioctl_block.in_buf = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(write_buf)); + ioctl_block.in_buf_len = write_buf_len; + ioctl_block.out_buf = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(read_buf)); + ioctl_block.out_buf_len = read_buf_len; int status = ::ioctl(device_handle, ioctl_code, &ioctl_block); if (status == -1) { diff --git a/host/lib/transport/nirio/niriok_proxy_impl_v2.cpp b/host/lib/transport/nirio/niriok_proxy_impl_v2.cpp index 09daa7862..8fb82708e 100644 --- a/host/lib/transport/nirio/niriok_proxy_impl_v2.cpp +++ b/host/lib/transport/nirio/niriok_proxy_impl_v2.cpp @@ -458,7 +458,7 @@ namespace uhd { namespace niusrprio nirio_status niriok_proxy_impl_v2::configure_fifo( uint32_t channel, uint32_t requested_depth, - uint8_t requires_actuals, + uint8_t /*requires_actuals*/, //Unused uint32_t& actual_depth, uint32_t& actual_size) { @@ -564,7 +564,7 @@ namespace uhd { namespace niusrprio uint32_t channel, uint32_t elements_to_read, void* buffer, - uint32_t buffer_datatype_width, + uint32_t /*buffer_datatype_width*/, //Unused uint32_t scalar_type, uint32_t bit_width, uint32_t timeout, @@ -605,7 +605,7 @@ namespace uhd { namespace niusrprio uint32_t channel, uint32_t elements_to_write, void* buffer, - uint32_t buffer_datatype_width, + uint32_t /*buffer_datatype_width*/, //Unused uint32_t scalar_type, uint32_t bit_width, uint32_t timeout, diff --git a/host/lib/transport/nirio_zero_copy.cpp b/host/lib/transport/nirio_zero_copy.cpp index 7ba8cb4c8..9d64d0792 100644 --- a/host/lib/transport/nirio_zero_copy.cpp +++ b/host/lib/transport/nirio_zero_copy.cpp @@ -267,13 +267,13 @@ private: // get the number of elements in the buffer and then // repeatedly with the number of remaining elements // until the buffer is empty - fifo_data_t* elems_buffer; for (size_t num_elems_requested = 0, num_elems_acquired = 0, num_elems_remaining = 1; num_elems_remaining; num_elems_requested = num_elems_remaining) { + fifo_data_t* elems_buffer = NULL; nirio_status status = _recv_fifo->acquire( elems_buffer, num_elems_requested, |