Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / libcmis / libcmis-0.3.0-warnings.patch
blobae69f479642971724c3cd0b6a3f0072c1b4f2566
1 diff --git src/libcmis/atom-folder.cxx src/libcmis/atom-folder.cxx
2 index f2e0381..1c65d41 100644
3 --- src/libcmis/atom-folder.cxx
4 +++ src/libcmis/atom-folder.cxx
5 @@ -177,7 +177,7 @@ libcmis::FolderPtr AtomFolder::createFolder( const map< string, libcmis::Propert
8 libcmis::DocumentPtr AtomFolder::createDocument( const map< string, libcmis::PropertyPtr >& properties,
9 - boost::shared_ptr< ostream > os, string contentType, string fileName ) throw ( libcmis::Exception )
10 + boost::shared_ptr< ostream > os, string contentType, string ) throw ( libcmis::Exception )
12 AtomLink* childrenLink = getLink( "down", "application/atom+xml;type=feed" );
14 diff --git src/libcmis/atom-session.cxx src/libcmis/atom-session.cxx
15 index c2baa4f..1716755 100644
16 --- src/libcmis/atom-session.cxx
17 +++ src/libcmis/atom-session.cxx
18 @@ -39,74 +39,6 @@
20 using namespace std;
22 -namespace
24 - size_t lcl_getEncoding( void *ptr, size_t size, size_t nmemb, void *userdata )
25 - {
26 - libcmis::EncodedData* data = static_cast< libcmis::EncodedData* >( userdata );
28 - string buf( ( const char* ) ptr, size * nmemb );
30 - size_t sepPos = buf.find( ':' );
31 - if ( sepPos != string::npos )
32 - {
33 - string name( buf, 0, sepPos );
34 - if ( "Content-Transfer-Encoding" == name )
35 - {
36 - string encoding = buf.substr( sepPos + 1 );
37 - encoding.erase( remove_if( encoding.begin(), encoding.end(), ptr_fun< int, int> ( isspace ) ), encoding.end() );
39 - data->setEncoding( encoding );
40 - }
41 - }
43 - return nmemb;
44 - }
46 - size_t lcl_bufferData( void* buffer, size_t size, size_t nmemb, void* data )
47 - {
48 - libcmis::EncodedData* encoded = static_cast< libcmis::EncodedData* >( data );
49 - encoded->decode( buffer, size, nmemb );
50 - return nmemb;
51 - }
53 - size_t lcl_readStream( void* buffer, size_t size, size_t nmemb, void* data )
54 - {
55 - istream& is = *( static_cast< istream* >( data ) );
56 - char* out = ( char * ) buffer;
57 - is.read( out, size * nmemb );
59 - return is.gcount( ) / size;
60 - }
62 - curlioerr lcl_ioctlStream( CURL* /*handle*/, int cmd, void* data )
63 - {
64 - curlioerr errCode = CURLIOE_OK;
66 - switch ( cmd )
67 - {
68 - case CURLIOCMD_RESTARTREAD:
69 - {
70 - istream& is = *( static_cast< istream* >( data ) );
71 - is.clear( );
72 - is.seekg( 0, ios::beg );
74 - if ( !is.good() )
75 - {
76 - fprintf ( stderr, "rewind failed\n" );
77 - errCode = CURLIOE_FAILRESTART;
78 - }
79 - }
80 - break;
81 - case CURLIOCMD_NOP:
82 - break;
83 - default:
84 - errCode = CURLIOE_UNKNOWNCMD;
85 - }
86 - return errCode;
87 - }
90 AtomPubSession::AtomPubSession( string atomPubUrl, string repositoryId,
91 string username, string password, bool verbose ) throw ( libcmis::Exception ) :
92 BaseSession( atomPubUrl, repositoryId, username, password, verbose ),
93 @@ -190,7 +122,7 @@ void AtomPubSession::initialize( ) throw ( libcmis::Exception )
95 m_repositories.push_back( ws );
97 - catch ( const libcmis::Exception& e )
98 + catch ( const libcmis::Exception& )
100 // Invalid repository, don't take care of this
102 diff --git src/libcmis/atom-workspace.cxx src/libcmis/atom-workspace.cxx
103 index b6f2388..527d0f4 100644
104 --- src/libcmis/atom-workspace.cxx
105 +++ src/libcmis/atom-workspace.cxx
106 @@ -69,6 +69,7 @@ AtomRepository::AtomRepository( xmlNodePtr wsNode ) throw ( libcmis::Exception )
109 AtomRepository::AtomRepository( const AtomRepository& rCopy ) :
110 + Repository( rCopy ),
111 m_collections( rCopy.m_collections ),
112 m_uriTemplates( rCopy.m_uriTemplates )
114 diff --git src/libcmis/base-session.cxx src/libcmis/base-session.cxx
115 index c99f110..b060d0b 100644
116 --- src/libcmis/base-session.cxx
117 +++ src/libcmis/base-session.cxx
118 @@ -61,28 +61,6 @@ namespace
119 return nmemb;
122 - size_t lcl_getEncoding( void *ptr, size_t size, size_t nmemb, void *userdata )
124 - libcmis::EncodedData* data = static_cast< libcmis::EncodedData* >( userdata );
126 - string buf( ( const char* ) ptr, size * nmemb );
128 - size_t sepPos = buf.find( ':' );
129 - if ( sepPos != string::npos )
131 - string name( buf, 0, sepPos );
132 - if ( "Content-Transfer-Encoding" == name )
134 - string encoding = buf.substr( sepPos + 1 );
135 - encoding.erase( remove_if( encoding.begin(), encoding.end(), ptr_fun< int, int> ( isspace ) ), encoding.end() );
137 - data->setEncoding( encoding );
141 - return nmemb;
144 size_t lcl_bufferData( void* buffer, size_t size, size_t nmemb, void* data )
146 libcmis::EncodedData* encoded = static_cast< libcmis::EncodedData* >( data );
147 @@ -125,16 +103,6 @@ namespace
149 return errCode;
152 - string lcl_tolower( string sText )
154 - string lower( sText );
155 - for ( size_t i = 0; i < sText.size(); ++i )
157 - lower[i] = ::tolower( sText[i] );
159 - return lower;
163 BaseSession::BaseSession( string atomPubUrl, string repositoryId,
164 @@ -443,7 +411,7 @@ const char* CurlException::what( ) const throw ()
165 if ( !isCancelled( ) )
167 stringstream buf;
168 - buf << "CURL error - " << m_code << ": ";
169 + buf << "CURL error - " << ( unsigned int )m_code << ": ";
170 buf << m_message;
171 m_errorMessage = buf.str( );
173 diff --git src/libcmis/object.cxx src/libcmis/object.cxx
174 index 690bb17..3397070 100644
175 --- src/libcmis/object.cxx
176 +++ src/libcmis/object.cxx
177 @@ -93,8 +93,8 @@ namespace libcmis
178 xmlXPathObjectPtr xpathObj = xmlXPathEvalExpression( BAD_CAST( "//cmis:allowableActions" ), xpathCtx );
179 if ( xpathObj && xpathObj->nodesetval && xpathObj->nodesetval->nodeNr > 0 )
181 - xmlNodePtr node = xpathObj->nodesetval->nodeTab[0];
182 - m_allowableActions.reset( new libcmis::AllowableActions( node ) );
183 + xmlNodePtr actionsNode = xpathObj->nodesetval->nodeTab[0];
184 + m_allowableActions.reset( new libcmis::AllowableActions( actionsNode ) );
186 xmlXPathFreeObject( xpathObj );
188 @@ -109,8 +109,8 @@ namespace libcmis
189 int size = xpathObj->nodesetval->nodeNr;
190 for ( int i = 0; i < size; i++ )
192 - xmlNodePtr node = xpathObj->nodesetval->nodeTab[i];
193 - libcmis::PropertyPtr property = libcmis::parseProperty( node, getTypeDescription( ) );
194 + xmlNodePtr propertyNode = xpathObj->nodesetval->nodeTab[i];
195 + libcmis::PropertyPtr property = libcmis::parseProperty( propertyNode, getTypeDescription( ) );
196 if ( property.get( ) )
197 m_properties[ property->getPropertyType( )->getId() ] = property;
199 diff --git src/libcmis/ws-requests.cxx src/libcmis/ws-requests.cxx
200 index 2b421b2..e13ae07 100644
201 --- src/libcmis/ws-requests.cxx
202 +++ src/libcmis/ws-requests.cxx
203 @@ -349,7 +349,7 @@ void UpdateProperties::toXml( xmlTextWriterPtr writer )
204 xmlTextWriterEndElement( writer );
207 -SoapResponsePtr UpdatePropertiesResponse::create( xmlNodePtr node, RelatedMultipart&, SoapSession* session )
208 +SoapResponsePtr UpdatePropertiesResponse::create( xmlNodePtr node, RelatedMultipart&, SoapSession* )
210 UpdatePropertiesResponse* response = new UpdatePropertiesResponse( );
212 @@ -425,7 +425,7 @@ void DeleteTree::toXml( xmlTextWriterPtr writer )
213 xmlTextWriterEndElement( writer );
216 -SoapResponsePtr DeleteTreeResponse::create( xmlNodePtr node, RelatedMultipart&, SoapSession* session )
217 +SoapResponsePtr DeleteTreeResponse::create( xmlNodePtr node, RelatedMultipart&, SoapSession* )
219 DeleteTreeResponse* response = new DeleteTreeResponse( );
221 @@ -624,7 +624,7 @@ void CreateFolder::toXml( xmlTextWriterPtr writer )
222 xmlTextWriterEndElement( writer );
225 -SoapResponsePtr CreateFolderResponse::create( xmlNodePtr node, RelatedMultipart&, SoapSession* session )
226 +SoapResponsePtr CreateFolderResponse::create( xmlNodePtr node, RelatedMultipart&, SoapSession* )
228 CreateFolderResponse* response = new CreateFolderResponse( );