From: David Steele Date: Mon, 5 Jun 2017 13:43:33 +0000 (+0100) Subject: Updated network client to fix cast build errors X-Git-Tag: dali_1.2.43~6^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F77%2F132477%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Updated network client to fix cast build errors 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 --- diff --git a/adaptors/base/performance-logging/networking/event/automation.cpp b/adaptors/base/performance-logging/networking/event/automation.cpp index 3226c32..79f6210 100644 --- a/adaptors/base/performance-logging/networking/event/automation.cpp +++ b/adaptors/base/performance-logging/networking/event/automation.cpp @@ -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 { diff --git a/adaptors/base/performance-logging/networking/network-performance-client.cpp b/adaptors/base/performance-logging/networking/network-performance-client.cpp index 5d2de3a..af0a48b 100644 --- a/adaptors/base/performance-logging/networking/network-performance-client.cpp +++ b/adaptors/base/performance-logging/networking/network-performance-client.cpp @@ -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 );