Minor fixes.
authorTom Sutcliffe <thomas.sutcliffe@accenture.com>
Sat, 06 Nov 2010 16:46:13 +0000
changeset 86 56b6ee983610
parent 85 6a08c6931c64
child 87 63fd51b1ff80
Minor fixes. * Fixed some static anaylsis warnings * Fixed armv5smp build re topsampler * Changed 'more' command to understand CTRL-C
build/common/common.mmh
commands/group/bld.inf
commands/group/fshell_commands.iby
commands/ping/pingmodel.cpp
core/src/pipe_line.cpp
libraries/btrace_parser/inc/btrace_parser.h
libraries/btrace_parser/src/btrace_reader.cpp
libraries/iosrv/client/command_base.cpp
libraries/iosrv/server/session.cpp
libraries/memoryaccess/DynamicDfcSupport.cpp
libraries/memoryaccess/MemoryAccess.cpp
libraries/qr3/src/keycapture.cpp
--- a/build/common/common.mmh	Fri Nov 05 11:46:32 2010 +0000
+++ b/build/common/common.mmh	Sat Nov 06 16:46:13 2010 +0000
@@ -246,6 +246,10 @@
 #define FSHELL_CORE_SUPPORT_CHKDEPS
 #define FSHELL_CORE_SUPPORT_SIS_ECLIPSE
 #define FSHELL_CORE_SUPPORT_LOCALDRIVE
+#endif
+
+#if defined(FSHELL_MEMORY_ACCESS_SUPPORT) && !defined(SMP)
+// Topsampler not updated to work on SMP
 #define FSHELL_CORE_SUPPORT_TOP
 #endif
 
--- a/commands/group/bld.inf	Fri Nov 05 11:46:32 2010 +0000
+++ b/commands/group/bld.inf	Sat Nov 06 16:46:13 2010 +0000
@@ -427,11 +427,16 @@
 ..\kerninfo\kerninfo.cif		z:\resource\cif\fshell\kerninfo.cif
 ..\setpriority\setpriority.cif		z:\resource\cif\fshell\setpriority.cif
 ..\setcritical\setcritical.cif		z:\resource\cif\fshell\setcritical.cif
-..\top\top.cif				z:\resource\cif\fshell\top.cif
 PRJ_MMPFILES
 ..\kerninfo\kerninfo.mmp
 ..\setpriority\setpriority.mmp
 ..\setcritical\setcritical.mmp
+#endif // FSHELL_MEMORY_ACCESS_SUPPORT
+
+#ifdef FSHELL_CORE_SUPPORT_TOP
+PRJ_EXPORTS
+..\top\top.cif				z:\resource\cif\fshell\top.cif
+PRJ_MMPFILES
 ..\top\top.mmp
 ..\top\top_sampler.mmp
 #endif
--- a/commands/group/fshell_commands.iby	Fri Nov 05 11:46:32 2010 +0000
+++ b/commands/group/fshell_commands.iby	Sat Nov 06 16:46:13 2010 +0000
@@ -365,12 +365,7 @@
 #endif
 
 #ifdef FSHELL_CORE_SUPPORT_TOP
-#if defined(FSHELL_ROMBUILD) && defined(SMP)
-// Don't include topsampler on SMP rombuilds.
-// We don't build the armv5smp topsampler and this will otherwise try and put the armv5 one on the rom, which will fail to link against the SMP kernel
-#else
 FSHELL_DEVICE_DRIVER(topsampler.ldd)
-#endif
 FSHELL_EXECUTABLE_FILE(top.exe)
 FSHELL_COMMAND_INFO_FILE(fshell,top.cif)
 #endif
--- a/commands/ping/pingmodel.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/commands/ping/pingmodel.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -764,6 +764,7 @@
 
 	
 	delete iPacketData;
+	iPacketData = NULL;
 	iPacketData= HBufC8::NewL(iPacketDataSize + ICMP_HDRLEN); 
 						//Allocates space for the ICMP packet
 	TPtr8 aux(iPacketData->Des());	//weird but necessary. Cannot use Des() directly in iPacket
@@ -774,6 +775,7 @@
 
 
 	delete iReceivedDataBuffer;
+	iReceivedDataBuffer = NULL;
 	iReceivedDataBuffer= HBufC8::NewL(iPacketDataSize + ICMP_ECHO_HEADER_SIZE);	//Maximum size of a return packet
 	TPtr8 auxPtr(iReceivedDataBuffer->Des());	//must be used here because the buffer changes
 	iReceivedData.Set(auxPtr);			//we use an aux var because can't use Des() directly Why??
--- a/core/src/pipe_line.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/core/src/pipe_line.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -647,6 +647,7 @@
 	if (iCommandName)
 		{
 		delete iCommandName;
+		iCommandName = NULL;
 		}
 	}
 
--- a/libraries/btrace_parser/inc/btrace_parser.h	Fri Nov 05 11:46:32 2010 +0000
+++ b/libraries/btrace_parser/inc/btrace_parser.h	Sat Nov 06 16:46:13 2010 +0000
@@ -138,8 +138,8 @@
 class MBtraceLog
 	{
 public:
-	IMPORT_C virtual TBool LogEnabled() = 0;
-	IMPORT_C virtual void Log(const TDesC& aLog) = 0;
+	virtual TBool LogEnabled() = 0;
+	virtual void Log(const TDesC& aLog) = 0;
 	};
 
 class CBtraceReader;
--- a/libraries/btrace_parser/src/btrace_reader.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/libraries/btrace_parser/src/btrace_reader.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -162,6 +162,7 @@
 	iReplayFile.Close();
 	iRecordFile.Close();
 	delete iReplayData;
+	iReplayData = NULL;
 	ResetAndReprimeL();
 	}
 
--- a/libraries/iosrv/client/command_base.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/libraries/iosrv/client/command_base.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -3382,6 +3382,7 @@
 					{
 					case 'q':
 					case 'Q':
+					case 3: // CTRL-C
 					case EKeyNull:
 						{
 						finished = ETrue;
--- a/libraries/iosrv/server/session.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/libraries/iosrv/server/session.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -50,13 +50,16 @@
 CIoSession::~CIoSession()
 	{
 	delete iFindByNameMatch;
-	const TInt maxNumObjects = iHandles->Count();
-	for (TInt i = 0; i < maxNumObjects; ++i)
+	if (iHandles)
 		{
-		CIoObject* obj = static_cast<CIoObject*>((*iHandles)[i]);
-		if (obj != NULL)
+		const TInt maxNumObjects = iHandles->Count();
+		for (TInt i = 0; i < maxNumObjects; ++i)
 			{
-			obj->SessionClosed(*this);
+			CIoObject* obj = static_cast<CIoObject*>((*iHandles)[i]);
+			if (obj != NULL)
+				{
+				obj->SessionClosed(*this);
+				}
 			}
 		}
 	Server().DropSession();
--- a/libraries/memoryaccess/DynamicDfcSupport.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/libraries/memoryaccess/DynamicDfcSupport.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -40,7 +40,10 @@
 
 TDynDfcQueWrapper::~TDynDfcQueWrapper()
 	{
-	iQueue->Destroy();
+	if (iQueue)
+		{
+		iQueue->Destroy();
+		}
 	}
 
 #else
--- a/libraries/memoryaccess/MemoryAccess.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/libraries/memoryaccess/MemoryAccess.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -107,7 +107,7 @@
     TInt DoCreate(TInt aUnit,const TDesC* anInfo,const TVersion& aVer);
 	void HandleMsg(TMessageBase* aMsg);
     void DoCancel(TInt aReqNo);
-    TInt DoRequest(TInt aReqNo,TRequestStatus aStatus,TAny* a1,TAny* a2);
+    TInt DoRequest(TInt aReqNo, TRequestStatus& aStatus, TAny* a1, TAny* a2);
     TInt DoControl(TInt aFunction,TAny *a1,TAny *a2);
 //API
     TInt GetThreadMem(TAny* aParams, TAny* aBuf);
@@ -437,7 +437,7 @@
 
 // DMemoryAccess::DoRequest
 //  Handles async messages, called from HandleMsg
-TInt DMemoryAccess::DoRequest(TInt /*aReqNo*/, TRequestStatus /*aStatus*/, TAny* /*a1*/, TAny* /*a2*/)
+TInt DMemoryAccess::DoRequest(TInt /*aReqNo*/, TRequestStatus& /*aStatus*/, TAny* /*a1*/, TAny* /*a2*/)
     {
     return KErrNone;
     }
--- a/libraries/qr3/src/keycapture.cpp	Fri Nov 05 11:46:32 2010 +0000
+++ b/libraries/qr3/src/keycapture.cpp	Sat Nov 06 16:46:13 2010 +0000
@@ -271,14 +271,20 @@
 	{
 	Cancel();
 
-	for (TInt i = 0; i < iCaptures->Count(); i++)
+	if (iCaptures)
 		{
-		SCapture& cap = iCaptures->operator[](i);
-		CancelCapture(cap);
+		for (TInt i = 0; i < iCaptures->Count(); i++)
+			{
+			SCapture& cap = iCaptures->operator[](i);
+			CancelCapture(cap);
+			}
+		delete iCaptures;
 		}
-	delete iCaptures;
-	iPushList->ResetAndDestroy();
-	delete iPushList;
+	if (iPushList)
+		{
+		iPushList->ResetAndDestroy();
+		delete iPushList;
+		}
 #ifdef FSHELL_WSERV_SUPPORT
 	iWg.Close();
 	iWs.Close();