Fix lldb-mi warnings so that it builds when --enable-werror is set.
authorDeepak Panickal <deepak@codeplay.com>
Thu, 6 Nov 2014 13:42:49 +0000 (13:42 +0000)
committerDeepak Panickal <deepak@codeplay.com>
Thu, 6 Nov 2014 13:42:49 +0000 (13:42 +0000)
llvm-svn: 221452

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

index 985f584..d59aa1a 100644 (file)
@@ -128,16 +128,16 @@ void CMICmnBase::ClrErrorDescription( void ) const
 //                     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 );
index db7338c..7daa392 100644 (file)
@@ -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;
 
index 1d66110..134b1d5 100644 (file)
@@ -167,7 +167,7 @@ bool CMICmnStreamStderr::WritePriv( const CMIUtilString & vText, const CMIUtilSt
                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() ) );
index 0532820..476b9c9 100644 (file)
@@ -161,7 +161,7 @@ bool CMICmnStreamStdout::WritePriv( const CMIUtilString & vText, const CMIUtilSt
                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() ) );
index 11c2462..ae07ac0 100644 (file)
@@ -174,16 +174,16 @@ CMIUtilString CMIUtilString::FormatPriv( const CMIUtilString & vrFormat, va_list
 // 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::ExtractNumberFromHexadecimal( MIint64 & vwrNumber ) const
                return false;
 
        const MIint64 nNum = ::strtoul( this->c_str(), nullptr, 16 );
-       if( nNum != ULONG_MAX )
+       if( nNum != LONG_MAX )
        {
                vwrNumber = nNum;
                return true;
index 30b027a..6ca46db 100644 (file)
@@ -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 );
index 3cb5979..c3ab3ac 100644 (file)
@@ -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 >::GetIsDerivedClass( void ) const
 
 //++ ------------------------------------------------------------------------------------
 // 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;