IVGCVSW-3949 Fix signed/unsigned comparison bug

Change-Id: I6a7a809e2d30f137f8221a7d30091d3d6821c213
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
diff --git a/src/profiling/SocketProfilingConnection.cpp b/src/profiling/SocketProfilingConnection.cpp
index 47fc62f..45b7f9d 100644
--- a/src/profiling/SocketProfilingConnection.cpp
+++ b/src/profiling/SocketProfilingConnection.cpp
@@ -125,7 +125,12 @@
             packetData = std::make_unique<char[]>(dataLength);
         }
 
-        if (dataLength != recv(m_Socket[0].fd, packetData.get(), dataLength, 0))
+        ssize_t receivedLength = recv(m_Socket[0].fd, packetData.get(), dataLength, 0);
+        if (receivedLength < 0)
+        {
+            throw armnn::RuntimeException(std::string("Error occured on recv: ") + strerror(errno));
+        }
+        if (dataLength != static_cast<uint32_t>(receivedLength))
         {
             // What do we do here if we can't read in a full packet?
             throw armnn::RuntimeException("Invalid MIPE packet");