forked from pool/cmis-client
Fixed the warnings in the SLE_10 build
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmis-client?expand=0&rev=4
This commit is contained in:
parent
4f599ed7a1
commit
b029ac1dad
@ -27,6 +27,8 @@ Summary: Sample CMIS client
|
||||
Url: http://people.freedesktop.org/~cbosdo/libcmis/libcmis-%{version}.tar.gz
|
||||
Group: Development/Libraries/C and C++
|
||||
Source0: libcmis-%{version}.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM warning-free.patch cbosdonnat@suse.com -- Fixes the warnings from -Weffc++
|
||||
Patch0: warning-free.patch
|
||||
BuildRequires: intltool
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: libxml2-devel
|
||||
@ -59,6 +61,7 @@ This allows C++ applications to connect to any CMIS-enabled repositories.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{_name}-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
|
119
warning-free.patch
Normal file
119
warning-free.patch
Normal file
@ -0,0 +1,119 @@
|
||||
diff --git a/src/cmis-client.cxx b/src/cmis-client.cxx
|
||||
index 8227737..5c7fbed 100644
|
||||
--- a/src/cmis-client.cxx
|
||||
+++ b/src/cmis-client.cxx
|
||||
@@ -48,6 +48,14 @@ class CommandException : public exception
|
||||
|
||||
public:
|
||||
CommandException( const char* msg ) : m_msg( msg ) { }
|
||||
+ CommandException( const CommandException& copy ) : m_msg( copy.m_msg ) { }
|
||||
+
|
||||
+ CommandException& operator=( const CommandException& copy )
|
||||
+ {
|
||||
+ m_msg = copy.m_msg;
|
||||
+ return *this;
|
||||
+ }
|
||||
+
|
||||
virtual const char* what() const throw() { return m_msg; }
|
||||
};
|
||||
|
||||
diff --git a/src/libcmis/atom-object.cxx b/src/libcmis/atom-object.cxx
|
||||
index f4a087f..c437198 100644
|
||||
--- a/src/libcmis/atom-object.cxx
|
||||
+++ b/src/libcmis/atom-object.cxx
|
||||
@@ -41,16 +41,39 @@ using namespace std;
|
||||
AtomCmisObject::AtomCmisObject( AtomPubSession* session, string url ) :
|
||||
m_session( session ),
|
||||
m_infosUrl( url ),
|
||||
+ m_id( ),
|
||||
m_name( ),
|
||||
m_baseType( ),
|
||||
m_type( )
|
||||
{
|
||||
}
|
||||
|
||||
+AtomCmisObject::AtomCmisObject( const AtomCmisObject& copy ) :
|
||||
+ m_session( copy.m_session ),
|
||||
+ m_infosUrl( copy.m_infosUrl ),
|
||||
+ m_id( copy.m_id ),
|
||||
+ m_name( copy.m_name ),
|
||||
+ m_baseType( copy.m_baseType ),
|
||||
+ m_type( copy.m_type )
|
||||
+{
|
||||
+}
|
||||
+
|
||||
AtomCmisObject::~AtomCmisObject( )
|
||||
{
|
||||
}
|
||||
|
||||
+AtomCmisObject& AtomCmisObject::operator=( const AtomCmisObject& copy )
|
||||
+{
|
||||
+ m_session = copy.m_session;
|
||||
+ m_infosUrl = copy.m_infosUrl;
|
||||
+ m_id = copy.m_id;
|
||||
+ m_name = copy.m_name;
|
||||
+ m_baseType = copy.m_baseType;
|
||||
+ m_type = copy.m_type;
|
||||
+
|
||||
+ return *this;
|
||||
+}
|
||||
+
|
||||
string AtomCmisObject::getId( )
|
||||
{
|
||||
return m_id;
|
||||
diff --git a/src/libcmis/atom-object.hxx b/src/libcmis/atom-object.hxx
|
||||
index bcec7d0..b789caf 100644
|
||||
--- a/src/libcmis/atom-object.hxx
|
||||
+++ b/src/libcmis/atom-object.hxx
|
||||
@@ -48,7 +48,10 @@ class AtomCmisObject : public virtual libcmis::CmisObject
|
||||
|
||||
public:
|
||||
AtomCmisObject( AtomPubSession* session, std::string url );
|
||||
+ AtomCmisObject( const AtomCmisObject& );
|
||||
~AtomCmisObject( );
|
||||
+
|
||||
+ AtomCmisObject& operator=( const AtomCmisObject& );
|
||||
|
||||
// Overridden methods from CmisObject
|
||||
virtual std::string getId( );
|
||||
diff --git a/src/libcmis/atom-session.cxx b/src/libcmis/atom-session.cxx
|
||||
index da12cc2..b7a7f3c 100644
|
||||
--- a/src/libcmis/atom-session.cxx
|
||||
+++ b/src/libcmis/atom-session.cxx
|
||||
@@ -77,7 +77,10 @@ string UriTemplate::createUrl( const string& pattern, map< string, string > vari
|
||||
AtomPubSession::AtomPubSession( string atomPubUrl, string repository ) :
|
||||
Session( ),
|
||||
m_sAtomPubUrl( atomPubUrl ),
|
||||
- m_sRepository( repository )
|
||||
+ m_sRepository( repository ),
|
||||
+ m_sRootId( ),
|
||||
+ m_aCollections( ),
|
||||
+ m_aUriTemplates( )
|
||||
{
|
||||
// Pull the content from sAtomPubUrl and parse it
|
||||
string buf = atom::httpGetRequest( m_sAtomPubUrl );
|
||||
diff --git a/src/libcmis/cmis-object.hxx b/src/libcmis/cmis-object.hxx
|
||||
index f1337de..7655779 100644
|
||||
--- a/src/libcmis/cmis-object.hxx
|
||||
+++ b/src/libcmis/cmis-object.hxx
|
||||
@@ -39,6 +39,8 @@ namespace libcmis
|
||||
class CmisObject
|
||||
{
|
||||
public:
|
||||
+ virtual ~CmisObject() {}
|
||||
+
|
||||
virtual std::string getId( ) = 0;
|
||||
virtual std::string getName( ) = 0;
|
||||
|
||||
diff --git a/src/libcmis/session.hxx b/src/libcmis/session.hxx
|
||||
index 00113d9..bc17229 100644
|
||||
--- a/src/libcmis/session.hxx
|
||||
+++ b/src/libcmis/session.hxx
|
||||
@@ -36,6 +36,7 @@ namespace libcmis
|
||||
class Session
|
||||
{
|
||||
public:
|
||||
+ virtual ~Session() { };
|
||||
|
||||
/** Get the Root folder of the repository
|
||||
*/
|
Loading…
Reference in New Issue
Block a user