aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/nirio
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport/nirio')
-rw-r--r--host/lib/transport/nirio/nirio_driver_iface_unsupported.cpp32
-rw-r--r--host/lib/transport/nirio/nirio_resource_manager.cpp11
-rw-r--r--host/lib/transport/nirio/niriok_proxy.cpp10
-rw-r--r--host/lib/transport/nirio/niriok_proxy_impl_v1.cpp11
-rw-r--r--host/lib/transport/nirio/niriok_proxy_impl_v2.cpp10
-rw-r--r--host/lib/transport/nirio/rpc/rpc_client.cpp2
6 files changed, 41 insertions, 35 deletions
diff --git a/host/lib/transport/nirio/nirio_driver_iface_unsupported.cpp b/host/lib/transport/nirio/nirio_driver_iface_unsupported.cpp
index 1a1142525..d265efa63 100644
--- a/host/lib/transport/nirio/nirio_driver_iface_unsupported.cpp
+++ b/host/lib/transport/nirio/nirio_driver_iface_unsupported.cpp
@@ -19,43 +19,43 @@
namespace nirio_driver_iface {
nirio_status rio_open(
- const std::string& device_path,
- rio_dev_handle_t& device_handle)
+ const std::string& /* device_path */,
+ rio_dev_handle_t& /* device_handle */)
{
return NiRio_Status_FeatureNotSupported;
}
-void rio_close(rio_dev_handle_t& device_handle)
+void rio_close(rio_dev_handle_t& /* device_handle */)
{
}
-bool rio_isopen(rio_dev_handle_t device_handle)
+bool rio_isopen(rio_dev_handle_t /* device_handle */)
{
return false;
}
nirio_status rio_ioctl(
- rio_dev_handle_t device_handle,
- uint32_t ioctl_code,
- const void *write_buf,
- size_t write_buf_len,
- void *read_buf,
- size_t read_buf_len)
+ rio_dev_handle_t /* device_handle */,
+ uint32_t /* ioctl_code */,
+ const void* /* write_buf */,
+ size_t /* write_buf_len */,
+ void* /* read_buf */,
+ size_t /* read_buf_len */)
{
return NiRio_Status_FeatureNotSupported;
}
nirio_status rio_mmap(
- rio_dev_handle_t device_handle,
- uint16_t memory_type,
- size_t size,
- bool writable,
- rio_mmap_t &map)
+ rio_dev_handle_t /* device_handle */,
+ uint16_t /* memory_type */,
+ size_t /* size */,
+ bool /* writable */,
+ rio_mmap_t& /* map */)
{
return NiRio_Status_FeatureNotSupported;
}
-nirio_status rio_munmap(rio_mmap_t &map)
+nirio_status rio_munmap(rio_mmap_t& /* map */)
{
return NiRio_Status_FeatureNotSupported;
}
diff --git a/host/lib/transport/nirio/nirio_resource_manager.cpp b/host/lib/transport/nirio/nirio_resource_manager.cpp
index e56670de0..d62f5c40d 100644
--- a/host/lib/transport/nirio/nirio_resource_manager.cpp
+++ b/host/lib/transport/nirio/nirio_resource_manager.cpp
@@ -15,12 +15,13 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-
#include <uhd/transport/nirio/nirio_resource_manager.h>
-#ifdef __clang__
- #pragma GCC diagnostic push ignored "-Wmissing-field-initializers"
-#elif defined(__GNUC__)
+// "push" and "pop" introduced in GCC 4.6; works with all clang
+#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5)
+ #pragma GCC diagnostic push
+#endif
+#if defined(__clang__) || defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
@@ -100,6 +101,6 @@ nirio_fifo_info_t* nirio_resource_manager::_lookup_fifo_info(const char* fifo_na
}}
-#ifdef __GNUC__
+#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5)
#pragma GCC diagnostic pop
#endif
diff --git a/host/lib/transport/nirio/niriok_proxy.cpp b/host/lib/transport/nirio/niriok_proxy.cpp
index cc2daba22..0cc13efb8 100644
--- a/host/lib/transport/nirio/niriok_proxy.cpp
+++ b/host/lib/transport/nirio/niriok_proxy.cpp
@@ -20,9 +20,11 @@
#include <uhd/transport/nirio/niriok_proxy_impl_v2.h>
#include <cstring>
-#ifdef __clang__
- #pragma GCC diagnostic push ignored "-Wmissing-field-initializers"
-#elif defined(__GNUC__)
+// "push" and "pop" introduced in GCC 4.6; works with all clang
+#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5)
+ #pragma GCC diagnostic push
+#endif
+#if defined(__clang__) || defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
@@ -73,6 +75,6 @@ namespace uhd { namespace niusrprio
}
}}
-#ifdef __GNUC__
+#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5)
#pragma GCC diagnostic pop
#endif
diff --git a/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp b/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp
index f4a8e4ff5..f0ffe2ffc 100644
--- a/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp
+++ b/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp
@@ -15,13 +15,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-
#include <uhd/transport/nirio/niriok_proxy_impl_v1.h>
#include <cstring>
-#ifdef __clang__
- #pragma GCC diagnostic push ignored "-Wmissing-field-initializers"
-#elif defined(__GNUC__)
+// "push" and "pop" introduced in GCC 4.6; works with all clang
+#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5)
+ #pragma GCC diagnostic push
+#endif
+#if defined(__clang__) || defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
@@ -490,6 +491,6 @@ namespace uhd { namespace niusrprio
}}
-#ifdef __GNUC__
+#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5)
#pragma GCC diagnostic pop
#endif
diff --git a/host/lib/transport/nirio/niriok_proxy_impl_v2.cpp b/host/lib/transport/nirio/niriok_proxy_impl_v2.cpp
index 8fb82708e..748db5cf8 100644
--- a/host/lib/transport/nirio/niriok_proxy_impl_v2.cpp
+++ b/host/lib/transport/nirio/niriok_proxy_impl_v2.cpp
@@ -19,9 +19,11 @@
#include <uhd/transport/nirio/niriok_proxy_impl_v2.h>
#include <cstring>
-#ifdef __clang__
- #pragma GCC diagnostic push ignored "-Wmissing-field-initializers"
-#elif defined(__GNUC__)
+// "push" and "pop" introduced in GCC 4.6; works with all clang
+#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5)
+ #pragma GCC diagnostic push
+#endif
+#if defined(__clang__) || defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
@@ -642,6 +644,6 @@ namespace uhd { namespace niusrprio
}}
-#ifdef __GNUC__
+#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5)
#pragma GCC diagnostic pop
#endif
diff --git a/host/lib/transport/nirio/rpc/rpc_client.cpp b/host/lib/transport/nirio/rpc/rpc_client.cpp
index cf8e9c1a9..48f47cfae 100644
--- a/host/lib/transport/nirio/rpc/rpc_client.cpp
+++ b/host/lib/transport/nirio/rpc/rpc_client.cpp
@@ -52,7 +52,7 @@ rpc_client::rpc_client (
//- address_configured: Only return addresses if a non-loopback address is configured for the system.
//- numeric_host: No name resolution should be attempted for host
//- numeric_service: No name resolution should be attempted for service
- tcp::resolver::query::flags query_flags;
+ tcp::resolver::query::flags query_flags = tcp::resolver::query::passive;
tcp::resolver::query query(tcp::v4(), server, port, query_flags);
tcp::resolver::iterator iterator = resolver.resolve(query);