From 1200721b696751edaceb70a332861f84fb8c16d5 Mon Sep 17 00:00:00 2001
From: Nicholas Corgan <nick.corgan@ettus.com>
Date: Fri, 27 Mar 2015 09:35:29 -0700
Subject: Warning fixes

* CMake now not applying C++ flags to C files
* GCC 4.4: anti-aliasing rules
* MSVC: narrowing, differences in subclass function parameters
* Clang: uninitialized variables
---
 host/lib/usrp/e300/e300_sensor_manager.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'host/lib/usrp/e300/e300_sensor_manager.cpp')

diff --git a/host/lib/usrp/e300/e300_sensor_manager.cpp b/host/lib/usrp/e300/e300_sensor_manager.cpp
index 95f31742b..527cfb91a 100644
--- a/host/lib/usrp/e300/e300_sensor_manager.cpp
+++ b/host/lib/usrp/e300/e300_sensor_manager.cpp
@@ -159,7 +159,7 @@ public:
         }
         UHD_ASSERT_THROW(uhd::ntohx<boost::uint32_t>(transaction.which) == GPS_FOUND);
         // TODO: Use proper serialization here ...
-        return static_cast<bool>(uhd::ntohx(transaction.value));
+        return (uhd::ntohx(transaction.value) > 0);
     }
 
     uhd::sensor_value_t get_gps_lock(void)
@@ -193,7 +193,7 @@ public:
         }
         UHD_ASSERT_THROW(uhd::ntohx<boost::uint32_t>(transaction.which) == GPS_LOCK);
         // TODO: Use proper serialization here ...
-        return sensor_value_t("GPS lock status", static_cast<bool>(uhd::ntohx(transaction.value)), "locked", "unlocked");
+        return sensor_value_t("GPS lock status", (uhd::ntohx(transaction.value) > 0), "locked", "unlocked");
     }
 
     uhd::sensor_value_t get_ref_lock(void)
@@ -227,7 +227,7 @@ public:
         }
         UHD_ASSERT_THROW(uhd::ntohx<boost::uint32_t>(transaction.which) == REF_LOCK);
         // TODO: Use proper serialization here ...
-        return sensor_value_t("Ref", static_cast<bool>(uhd::ntohx(transaction.value)), "locked", "unlocked");
+        return sensor_value_t("Ref", (uhd::ntohx(transaction.value) > 0), "locked", "unlocked");
     }
 
 private:
-- 
cgit v1.2.3