From afcc1c0f9c6769fb6a0dc1f821fe0c8bc0fe1e23 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 5 Dec 2013 02:36:00 +0000 Subject: [PATCH] Avoid a clang++ warning. git-svn-id: https://valelab.ucsf.edu/svn/micromanager2/trunk@12317 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd --- MMCore/AppleHost.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MMCore/AppleHost.h b/MMCore/AppleHost.h index f7695075e0..9511e54d17 100644 --- a/MMCore/AppleHost.h +++ b/MMCore/AppleHost.h @@ -147,8 +147,6 @@ static kern_return_t FindEthernetInterfaces(io_iterator_t *matchingServices) // In this sample the iterator should contain just the primary interface. static kern_return_t GetMACAddress(io_iterator_t intfIterator, UInt8 *MACAddress, UInt8 bufferSize) { - io_object_t intfService; - io_object_t controllerService; kern_return_t kernResult = KERN_FAILURE; // Make sure the caller provided enough buffer space. Protect against buffer overflow problems. @@ -160,8 +158,9 @@ static kern_return_t GetMACAddress(io_iterator_t intfIterator, UInt8 *MACAddress bzero(MACAddress, bufferSize); // IOIteratorNext retains the returned object, so release it when we're done with it. - while (intfService = IOIteratorNext(intfIterator)) + while (io_object_t intfService = IOIteratorNext(intfIterator)) { + io_object_t controllerService; CFTypeRef MACAddressAsCFData; // IONetworkControllers can't be found directly by the IOServiceGetMatchingServices call,