mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl
changeset 25 d881023c13eb
parent 0 a2952bb97e68
child 32 edd273b3192a
--- a/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl	Fri Apr 16 15:28:14 2010 +0300
+++ b/mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpperflog.inl	Mon May 03 12:58:40 2010 +0300
@@ -71,10 +71,13 @@
     VA_LIST list;
     VA_START( list, aFmt );
 
-    TBuf<KMtpLogBufferSize> buf;
-    
-    buf.AppendFormatList( aFmt, list, &iOverflowHandler );
-    Write( buf );
+    HBufC* buf = HBufC::New( KMtpLogBufferSize );
+    if ( buf )
+        {
+        buf->Des().AppendFormatList( aFmt, list, &iOverflowHandler );
+        Write( *buf );
+        delete buf;
+        }
     }
 
 void CMmMtpDpPerfLog::Start( const TDesC& aDescription )
@@ -187,9 +190,11 @@
     
     if (totalTimeValue <= 0xFFFFFFFF)
         {
+        //Define the ptr on stack to avoid compiling warnning for wiscw udeb
+        TPtrC ptr( iDescription[index] );
         WriteFormat( _L( "<PERFLOG>%S-%S, usage = %u, last time = %u.%S ms, total time = %u.%S ms, average time = %u.%S ms</PERFLOG>" ), 
             iTitle, 
-            &iDescription[index], 
+            &ptr,
             iTotalUsage[index], 
             lastTimeValue, 
             &lastTimeDecimal, 
@@ -200,9 +205,11 @@
         }
     else
         {
+        //Define the ptr on stack to avoid compiling warnning for wiscw udeb
+        TPtrC ptr( iDescription[index] );
         WriteFormat( _L( "<PERFLOG>%S-%S, usage = %u, last time = %u.%S ms, total time = %u%u.%S ms, average time = %u.%S ms</PERFLOG>" ), 
             iTitle, 
-            &iDescription[index], 
+            &ptr,
             iTotalUsage[index], 
             lastTimeValue, 
             &lastTimeDecimal,