Updated network client to fix cast build errors 77/132477/1
authorDavid Steele <david.steele@samsung.com>
Mon, 5 Jun 2017 13:43:33 +0000 (14:43 +0100)
committerDavid Steele <david.steele@samsung.com>
Mon, 5 Jun 2017 13:43:33 +0000 (14:43 +0100)
This variant of the build options is not tested by the build server
(--enable-networklogging), consequently, these errors were not
discovered when -Werror=old-style-cast was added.

Apparently no-one else uses Stagehand any more...

Change-Id: I69fdaa03608723b66be080bd7749e243b7ea6a89
Signed-off-by: David Steele <david.steele@samsung.com>
adaptors/base/performance-logging/networking/event/automation.cpp
adaptors/base/performance-logging/networking/network-performance-client.cpp

index 3226c32..79f6210 100644 (file)
@@ -249,7 +249,7 @@ void AppendPropertyNameAndValue( Dali::Handle handle, int propertyIndex, std::os
       }
       else if( '\x00' <= *c && *c <= '\x1f' )
       {
-        escapedValue << "\\u" << std::hex << std::setw(4) << std::setfill('0') << (int)*c;
+        escapedValue << "\\u" << std::hex << std::setw(4) << std::setfill('0') << int(*c);
       }
       else
       {
index 5d2de3a..af0a48b 100644 (file)
@@ -169,8 +169,9 @@ bool NetworkPerformanceClient::TransmitMarker( const PerformanceMarker& marker,
   {
     // write out the time stamp
     char buffer[64];
+    double usec = marker.GetTimeStamp().microseconds;
     int size = snprintf( buffer, sizeof(buffer),"%.6f (seconds), %s\n",
-                         ( (double) marker.GetTimeStamp().microseconds * MICROSECONDS_TO_SECOND ),
+                         usec * MICROSECONDS_TO_SECOND,
                          description );
 
    return mSocket->Write( buffer, size );