mpserviceplugins/mpxsqlitedbcommon/src/mpxdbmanager.cpp
changeset 47 4cc1412daed0
parent 45 612c4815aebe
equal deleted inserted replaced
45:612c4815aebe 47:4cc1412daed0
   503 	   }
   503 	   }
   504 	User::LeaveIfError ( error );
   504 	User::LeaveIfError ( error );
   505     CleanupClosePushL( dstFile );
   505     CleanupClosePushL( dstFile );
   506     
   506     
   507     // resize destination file
   507     // resize destination file
   508     TInt remainingBytes;
   508     TInt remainingBytes = 0;
   509     User::LeaveIfError( srcFile.Size(remainingBytes) );
   509     User::LeaveIfError( srcFile.Size(remainingBytes) );
   510     User::LeaveIfError( dstFile.SetSize(remainingBytes) );
   510     User::LeaveIfError( dstFile.SetSize(remainingBytes) );
   511 
   511 
   512     // allocate buffer
   512     // allocate buffer
   513    	const TInt KBigBufSize = 512 * 1024;
   513    	const TInt KBigBufSize = 512 * 1024;
  1852 #ifdef __RAMDISK_PERF_ENABLE
  1852 #ifdef __RAMDISK_PERF_ENABLE
  1853         if( database.iUseRAMdb )
  1853         if( database.iUseRAMdb )
  1854             {
  1854             {
  1855             delete database.iAliasname;
  1855             delete database.iAliasname;
  1856             database.iAliasname = HBufC::NewL(KAliasName().Length());
  1856             database.iAliasname = HBufC::NewL(KAliasName().Length());
       
  1857             // coverity[size_error]
       
  1858             // coverity[buffer_alloc]
  1857             HBufC* temp = HBufC::NewLC(2); // form of DE, DF, DX,...
  1859             HBufC* temp = HBufC::NewLC(2); // form of DE, DF, DX,...
  1858             temp->Des().Append(iRAMDrive); // length == 2
  1860             temp->Des().Append(iRAMDrive); // length == 2
  1859             TDriveUnit pdrive( database.iDrive );
  1861             TDriveUnit pdrive( database.iDrive );
  1860             temp->Des().Append(pdrive.Name().Left(1)); //length == 2+ 1
  1862             temp->Des().Append(pdrive.Name().Left(1)); //length == 2+ 1
  1861             database.iAliasname->Des().Format(KRAMAliasName, temp);
  1863             database.iAliasname->Des().Format(KRAMAliasName, temp);
  2206 void CMPXDbManager::PrintTableValuesL(
  2208 void CMPXDbManager::PrintTableValuesL(
  2207     RSqlStatement& aStatement)
  2209     RSqlStatement& aStatement)
  2208     {
  2210     {
  2209     TInt columnCount(GetColumnCountL(aStatement));
  2211     TInt columnCount(GetColumnCountL(aStatement));
  2210     TInt err(KErrNone);
  2212     TInt err(KErrNone);
       
  2213     // coverity[incorrect_multiplication]
       
  2214     // coverity[buffer_alloc]
  2211     HBufC* tableRow = HBufC::NewLC(255 * columnCount);
  2215     HBufC* tableRow = HBufC::NewLC(255 * columnCount);
  2212     TPtr tableRowPtr = tableRow->Des();
  2216     TPtr tableRowPtr = tableRow->Des();
  2213 
  2217 
  2214     while ((err = aStatement.Next()) == KSqlAtRow)
  2218     while ((err = aStatement.Next()) == KSqlAtRow)
  2215         {
  2219         {