From 715f4dd313656f936e40b6415179b7ab6feda128 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Fri, 27 Mar 2015 10:55:48 -0700 Subject: Fixed master-specific warnings * MinGW: unused parameter warning, MSVC-specific pragma * MSVC: bool narrowing --- host/lib/transport/chdr.cpp | 6 +++--- host/lib/utils/thread_priority.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'host/lib') diff --git a/host/lib/transport/chdr.cpp b/host/lib/transport/chdr.cpp index 47ac961b9..632887e56 100644 --- a/host/lib/transport/chdr.cpp +++ b/host/lib/transport/chdr.cpp @@ -115,12 +115,12 @@ UHD_INLINE void _hdr_unpack_chdr( if_packet_info.sob = false; // Set configurable members - if_packet_info.has_tsf = bool(chdr & HDR_FLAG_TSF); + if_packet_info.has_tsf = (chdr & HDR_FLAG_TSF) > 0; if_packet_info.packet_type = if_packet_info_t::packet_type_t((chdr >> 30) & 0x3); if_packet_info.eob = (if_packet_info.packet_type == if_packet_info_t::PACKET_TYPE_DATA) - && bool(chdr & HDR_FLAG_EOB); + && ((chdr & HDR_FLAG_EOB) > 0); if_packet_info.error = (if_packet_info.packet_type == if_packet_info_t::PACKET_TYPE_RESP) - && bool(chdr & HDR_FLAG_ERROR); + && ((chdr & HDR_FLAG_ERROR) > 0); if_packet_info.packet_count = (chdr >> 16) & 0xFFF; // Set packet length variables diff --git a/host/lib/utils/thread_priority.cpp b/host/lib/utils/thread_priority.cpp index 7c3faa37a..af25d088a 100644 --- a/host/lib/utils/thread_priority.cpp +++ b/host/lib/utils/thread_priority.cpp @@ -74,7 +74,7 @@ static void check_priority_range(float priority){ #ifdef HAVE_WIN_SETTHREADPRIORITY #include - void uhd::set_thread_priority(float priority, bool realtime){ + void uhd::set_thread_priority(float priority, UHD_UNUSED(bool realtime)){ check_priority_range(priority); /* -- cgit v1.2.3