[Lldb-commits] [lldb] r221452 - Fix lldb-mi warnings so that it builds when --enable-werror is set.

Deepak Panickal deepak at codeplay.com
Thu Nov 6 05:42:50 PST 2014


Author: panickal
Date: Thu Nov  6 07:42:49 2014
New Revision: 221452

URL: http://llvm.org/viewvc/llvm-project?rev=221452&view=rev
Log:
Fix lldb-mi warnings so that it builds when --enable-werror is set.

Modified:
    lldb/trunk/tools/lldb-mi/MICmnBase.cpp
    lldb/trunk/tools/lldb-mi/MICmnBase.h
    lldb/trunk/tools/lldb-mi/MICmnStreamStderr.cpp
    lldb/trunk/tools/lldb-mi/MICmnStreamStdout.cpp
    lldb/trunk/tools/lldb-mi/MIUtilString.cpp
    lldb/trunk/tools/lldb-mi/MIUtilString.h
    lldb/trunk/tools/lldb-mi/MIUtilVariant.h

Modified: lldb/trunk/tools/lldb-mi/MICmnBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnBase.cpp?rev=221452&r1=221451&r2=221452&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnBase.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnBase.cpp Thu Nov  6 07:42:49 2014
@@ -128,16 +128,16 @@ void CMICmnBase::ClrErrorDescription( vo
 //			seen by users. Message is available to the client using the server and sent
 //			to the Logger.
 // Type:	Method.
-// Args:	vrFormat	- (R) Format string.
-//			...			- (R) Variable number of CMIUtilString type objects.
+// Args:	vFormat	- (R) Format string.
+//			...		- (R) Variable number of CMIUtilString type objects.
 // Return:	None.
 // Throws:	None.
 //--
-void CMICmnBase::SetErrorDescriptionn( const CMIUtilString & vrFormat, ... ) const
+void CMICmnBase::SetErrorDescriptionn( const CMIUtilString vFormat, ... ) const
 {
 	va_list args;
-	va_start( args, vrFormat );
-	CMIUtilString strResult = CMIUtilString::FormatValist( vrFormat, args );
+	va_start( args, vFormat );
+	CMIUtilString strResult = CMIUtilString::FormatValist( vFormat, args );
 	va_end( args );
 
 	SetErrorDescription( strResult );

Modified: lldb/trunk/tools/lldb-mi/MICmnBase.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnBase.h?rev=221452&r1=221451&r2=221452&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnBase.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnBase.h Thu Nov  6 07:42:49 2014
@@ -43,7 +43,7 @@ public:
 	bool					HaveErrorDescription( void ) const;
 	const CMIUtilString &	GetErrorDescription( void ) const;
 	void					SetErrorDescription( const CMIUtilString & vrTxt ) const;
-	void					SetErrorDescriptionn( const CMIUtilString & vrFormat, ... ) const;
+	void					SetErrorDescriptionn( const CMIUtilString vFormat, ... ) const;
 	void					SetErrorDescriptionNoLog( const CMIUtilString & vrTxt ) const;
 	void					ClrErrorDescription( void ) const;
 

Modified: lldb/trunk/tools/lldb-mi/MICmnStreamStderr.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnStreamStderr.cpp?rev=221452&r1=221451&r2=221452&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnStreamStderr.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnStreamStderr.cpp Thu Nov  6 07:42:49 2014
@@ -167,7 +167,7 @@ bool CMICmnStreamStderr::WritePriv( cons
 		CMIUtilThreadLock _lock( m_mutex );
 
 		// Send this text to stderr
-		const MIuint status = ::fputs( vText.c_str(), stderr );
+		const MIint status = ::fputs( vText.c_str(), stderr );
 		if( status == EOF )
 		{
 			const CMIUtilString errMsg( CMIUtilString::Format( MIRSRC( IDS_STDERR_ERR_NOT_ALL_DATA_WRITTEN ), vText.c_str() ) );

Modified: lldb/trunk/tools/lldb-mi/MICmnStreamStdout.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnStreamStdout.cpp?rev=221452&r1=221451&r2=221452&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnStreamStdout.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnStreamStdout.cpp Thu Nov  6 07:42:49 2014
@@ -161,7 +161,7 @@ bool CMICmnStreamStdout::WritePriv( cons
 		CMIUtilThreadLock _lock( m_mutex );
 
 		// Send this text to stdout
-		const MIuint status = ::fputs( vText.c_str(), stdout );
+		const MIint status = ::fputs( vText.c_str(), stdout );
 		if( status == EOF )
 		{
 			const CMIUtilString errMsg( CMIUtilString::Format( MIRSRC( IDS_STDOUT_ERR_NOT_ALL_DATA_WRITTEN ), vText.c_str() ) );

Modified: lldb/trunk/tools/lldb-mi/MIUtilString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilString.cpp?rev=221452&r1=221451&r2=221452&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilString.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilString.cpp Thu Nov  6 07:42:49 2014
@@ -174,16 +174,16 @@ CMIUtilString CMIUtilString::FormatPriv(
 // Details:	Perform a snprintf format style on a string data. A new string object is 
 //			created and returned.
 // Type:	Static method.
-// Args:	vrFormat		- (R) Format string data instruction.
-//			...				- (R) Var list args of any type.
+// Args:	vFormat		- (R) Format string data instruction.
+//			...			- (R) Var list args of any type.
 // Return:	CMIUtilString - Number of splits found in the string data.
 // Throws:	None.
 //--
-CMIUtilString CMIUtilString::Format( const CMIUtilString & vrFormating, ... )
+CMIUtilString CMIUtilString::Format( const CMIUtilString vFormating, ... )
 {
 	va_list args;
-	va_start( args, vrFormating );
-	CMIUtilString strResult = CMIUtilString::FormatPriv( vrFormating, args );
+	va_start( args, vFormating );
+	CMIUtilString strResult = CMIUtilString::FormatPriv( vFormating, args );
 	va_end( args );
 
 	return strResult;
@@ -481,7 +481,7 @@ bool CMIUtilString::ExtractNumberFromHex
 		return false;
 
 	const MIint64 nNum = ::strtoul( this->c_str(), nullptr, 16 );
-	if( nNum != ULONG_MAX )
+	if( nNum != LONG_MAX )
 	{
 		vwrNumber = nNum;
 		return true;

Modified: lldb/trunk/tools/lldb-mi/MIUtilString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilString.h?rev=221452&r1=221451&r2=221452&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilString.h (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilString.h Thu Nov  6 07:42:49 2014
@@ -43,7 +43,7 @@ public:
 
 // Static method:
 public:
-	static CMIUtilString	Format( const CMIUtilString & vrFormating, ... );
+	static CMIUtilString	Format( const CMIUtilString vFormating, ... );
 	static CMIUtilString	FormatBinary( const MIuint64 vnDecimal );
 	static CMIUtilString	FormatValist( const CMIUtilString & vrFormating, va_list vArgs );
 	static bool				IsAllValidAlphaAndNumeric( const MIchar & vrText );

Modified: lldb/trunk/tools/lldb-mi/MIUtilVariant.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilVariant.h?rev=221452&r1=221451&r2=221452&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilVariant.h (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilVariant.h Thu Nov  6 07:42:49 2014
@@ -114,10 +114,13 @@ private:
 		virtual CDataObjectBase *	CreateCopyOfSelf( void );
 		virtual bool				GetIsDerivedClass( void ) const;
 
+	// Overrideable:
+	private:
+		virtual void Duplicate( const CDataObject & vrOther );
+
 	// Overridden:
 	private:
 		// From CDataObjectBase
-		virtual void Copy( const CDataObject & vrOther );
 		virtual void Destroy( void );
 
 	// Attributes:
@@ -222,14 +225,14 @@ bool CMIUtilVariant::CDataObject< T >::G
 
 //++ ------------------------------------------------------------------------------------
 // Details:	Perform a bitwise copy of *this object.
-// Type:	Overridden.
+// Type:	Overrideable.
 // Args:	T		- The object's type.
 //			vrOther	- (R) The other object.
 // Return:	None.
 // Throws:	None.
 //--
 template< typename T >
-void CMIUtilVariant::CDataObject< T >::Copy( const CDataObject & vrOther )
+void CMIUtilVariant::CDataObject< T >::Duplicate( const CDataObject & vrOther )
 {
 	CDataObjectBase::Copy( vrOther );
 	m_dataObj = vrOther.m_dataObj;





More information about the lldb-commits mailing list