From ccc7e4a0ab3bcbdb73ad9525873193ab657715c8 Mon Sep 17 00:00:00 2001 From: Mathieu Rondonneau Date: Thu, 23 May 2013 19:33:54 -0700 Subject: [PATCH] OP-958: fix cast. I am about to check-in something that I have not compiled :( Will check build server to make sure it pass build and revert if needed. --- .../openpilotgcs/src/plugins/opHID/src/opHID_usbmon_mac.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/opHID/src/opHID_usbmon_mac.cpp b/ground/openpilotgcs/src/plugins/opHID/src/opHID_usbmon_mac.cpp index aec0a83a7..61fd86230 100644 --- a/ground/openpilotgcs/src/plugins/opHID/src/opHID_usbmon_mac.cpp +++ b/ground/openpilotgcs/src/plugins/opHID/src/opHID_usbmon_mac.cpp @@ -230,12 +230,12 @@ static bool HID_GetIntProperty(IOHIDDeviceRef dev, CFStringRef property, int *va */ static bool HID_GetStrProperty(IOHIDDeviceRef dev, CFStringRef property, QString & value) { - CFTypeRef prop = IOHIDDeviceGetProperty(dev, property); + CFStringRef prop = static_cast(IOHIDDeviceGetProperty(dev, property)); if (prop) { if (CFStringGetTypeID() == CFGetTypeID(prop)) { // if a string char buffer[2550]; - bool success = CFStringGetCString((CFStringRef)prop, buffer, sizeof(buffer), kCFStringEncodingMacRoman); + bool success = CFStringGetCString(prop, buffer, sizeof(buffer), kCFStringEncodingMacRoman); value = QString(buffer); return success; }