From 0c7d748bbf6c282d3f1c759201e40f35f26133ca Mon Sep 17 00:00:00 2001 From: Moritz Fischer Date: Tue, 14 Apr 2015 15:12:04 -0500 Subject: x300: nirio: Fix compiler warnings The old code used a non standard (though very common) way to determine the size of an array. In order to avoid warnings, pass another parameter to indicate the size. Signed-off-by: Moritz Fischer --- host/include/uhd/transport/nirio/nirio_quirks.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/transport/nirio/nirio_quirks.h b/host/include/uhd/transport/nirio/nirio_quirks.h index 8e58f80f1..45ef40394 100644 --- a/host/include/uhd/transport/nirio/nirio_quirks.h +++ b/host/include/uhd/transport/nirio/nirio_quirks.h @@ -35,8 +35,8 @@ public: nirio_quirks() : _tx_stream_count(0) { } - UHD_INLINE void register_tx_streams(const uint32_t tx_stream_indices[]) { - for (size_t i = 0; i < sizeof(tx_stream_indices)/sizeof(*tx_stream_indices); i++) { + UHD_INLINE void register_tx_streams(const uint32_t tx_stream_indices[], size_t size) { + for (size_t i = 0; i < size; i++) { _tx_stream_fifo_indices.insert(tx_stream_indices[i]); } } -- cgit v1.2.3