1 From c86638560b3cb39b847d4e84ae9b8492f0c5fa22 Mon Sep 17 00:00:00 2001
2 From: Mike Kaganski <mikekaganski@hotmail.com>
3 Date: Thu, 22 Feb 2024 20:47:48 +0600
4 Subject: [PATCH] Fix warning C4589 when building with MSVC
6 C:\libcmis\inc\libcmis/document.hxx(51): warning C4589: Constructor of abstract class 'libcmis::Document' ignores initializer for virtual base class 'libcmis::Object'
7 C:\libcmis\inc\libcmis/document.hxx(51): note: virtual base classes are only initialized by the most-derived type
8 C:\libcmis\inc\libcmis/folder.hxx(58): warning C4589: Constructor of abstract class 'libcmis::Folder' ignores initializer for virtual base class 'libcmis::Object'
9 C:\libcmis\inc\libcmis/folder.hxx(58): note: virtual base classes are only initialized by the most-derived type
11 inc/libcmis/document.hxx | 1 -
12 inc/libcmis/folder.hxx | 1 -
13 src/libcmis/atom-document.cxx | 2 --
14 src/libcmis/atom-folder.cxx | 1 -
15 src/libcmis/gdrive-document.cxx | 2 --
16 src/libcmis/gdrive-folder.cxx | 2 --
17 src/libcmis/onedrive-document.cxx | 2 --
18 src/libcmis/onedrive-folder.cxx | 2 --
19 src/libcmis/sharepoint-document.cxx | 2 --
20 src/libcmis/sharepoint-folder.cxx | 2 --
21 src/libcmis/ws-document.cxx | 1 -
22 src/libcmis/ws-folder.cxx | 1 -
23 12 files changed, 19 deletions(-)
25 diff --git a/inc/libcmis/document.hxx b/inc/libcmis/document.hxx
26 index 8f44313..ca18a84 100644
27 --- a/inc/libcmis/document.hxx
28 +++ b/inc/libcmis/document.hxx
29 @@ -48,7 +48,6 @@ namespace libcmis
30 class LIBCMIS_API Document : public virtual Object
33 - Document( Session* session ) : Object( session ) { }
34 virtual ~Document( ) { }
36 /** Get the folder parents for the document.
37 diff --git a/inc/libcmis/folder.hxx b/inc/libcmis/folder.hxx
38 index 0010dbd..24f4ac4 100644
39 --- a/inc/libcmis/folder.hxx
40 +++ b/inc/libcmis/folder.hxx
41 @@ -55,7 +55,6 @@ namespace libcmis
42 class LIBCMIS_API Folder : public virtual Object
45 - Folder( Session* session ) : Object( session ) { }
48 virtual std::vector< std::string > getPaths( );
49 diff --git a/src/libcmis/atom-document.cxx b/src/libcmis/atom-document.cxx
50 index e0400b1..8871dbc 100644
51 --- a/src/libcmis/atom-document.cxx
52 +++ b/src/libcmis/atom-document.cxx
53 @@ -43,7 +43,6 @@ using namespace libcmis;
55 AtomDocument::AtomDocument( AtomPubSession* session ) :
56 libcmis::Object( session ),
57 - libcmis::Document( session ),
58 AtomObject( session ),
61 @@ -52,7 +51,6 @@ AtomDocument::AtomDocument( AtomPubSession* session ) :
63 AtomDocument::AtomDocument( AtomPubSession* session, xmlNodePtr entryNd ) :
64 libcmis::Object( session ),
65 - libcmis::Document( session ),
66 AtomObject( session ),
69 diff --git a/src/libcmis/atom-folder.cxx b/src/libcmis/atom-folder.cxx
70 index 5e41194..25276a1 100644
71 --- a/src/libcmis/atom-folder.cxx
72 +++ b/src/libcmis/atom-folder.cxx
73 @@ -46,7 +46,6 @@ namespace
75 AtomFolder::AtomFolder( AtomPubSession* session, xmlNodePtr entryNd ) :
76 libcmis::Object( session ),
77 - libcmis::Folder( session ),
80 xmlDocPtr doc = libcmis::wrapInDoc( entryNd );
81 diff --git a/src/libcmis/gdrive-document.cxx b/src/libcmis/gdrive-document.cxx
82 index ecb13d6..a826cf7 100644
83 --- a/src/libcmis/gdrive-document.cxx
84 +++ b/src/libcmis/gdrive-document.cxx
85 @@ -40,7 +40,6 @@ using namespace libcmis;
87 GDriveDocument::GDriveDocument( GDriveSession* session ) :
88 libcmis::Object( session),
89 - libcmis::Document( session ),
90 GDriveObject( session ),
91 m_isGoogleDoc( false )
93 @@ -48,7 +47,6 @@ GDriveDocument::GDriveDocument( GDriveSession* session ) :
95 GDriveDocument::GDriveDocument( GDriveSession* session, Json json, string id, string name ) :
96 libcmis::Object( session),
97 - libcmis::Document( session ),
98 GDriveObject( session, json, id, name ),
99 m_isGoogleDoc( false )
101 diff --git a/src/libcmis/gdrive-folder.cxx b/src/libcmis/gdrive-folder.cxx
102 index 26de89b..3aa5faf 100644
103 --- a/src/libcmis/gdrive-folder.cxx
104 +++ b/src/libcmis/gdrive-folder.cxx
105 @@ -38,14 +38,12 @@ using namespace libcmis;
107 GDriveFolder::GDriveFolder( GDriveSession* session ):
108 libcmis::Object( session ),
109 - libcmis::Folder( session ),
110 GDriveObject( session )
114 GDriveFolder::GDriveFolder( GDriveSession* session, Json json ):
115 libcmis::Object( session ),
116 - libcmis::Folder( session ),
117 GDriveObject( session, json )
120 diff --git a/src/libcmis/onedrive-document.cxx b/src/libcmis/onedrive-document.cxx
121 index 863a92f..ced64e0 100644
122 --- a/src/libcmis/onedrive-document.cxx
123 +++ b/src/libcmis/onedrive-document.cxx
124 @@ -40,14 +40,12 @@ using namespace libcmis;
126 OneDriveDocument::OneDriveDocument( OneDriveSession* session ) :
127 libcmis::Object( session),
128 - libcmis::Document( session ),
129 OneDriveObject( session )
133 OneDriveDocument::OneDriveDocument( OneDriveSession* session, Json json, string id, string name ) :
134 libcmis::Object( session),
135 - libcmis::Document( session ),
136 OneDriveObject( session, json, id, name )
139 diff --git a/src/libcmis/onedrive-folder.cxx b/src/libcmis/onedrive-folder.cxx
140 index c1980c8..3fa455a 100644
141 --- a/src/libcmis/onedrive-folder.cxx
142 +++ b/src/libcmis/onedrive-folder.cxx
143 @@ -38,14 +38,12 @@ using namespace libcmis;
145 OneDriveFolder::OneDriveFolder( OneDriveSession* session ):
146 libcmis::Object( session ),
147 - libcmis::Folder( session ),
148 OneDriveObject( session )
152 OneDriveFolder::OneDriveFolder( OneDriveSession* session, Json json ):
153 libcmis::Object( session ),
154 - libcmis::Folder( session ),
155 OneDriveObject( session, json )
158 diff --git a/src/libcmis/sharepoint-document.cxx b/src/libcmis/sharepoint-document.cxx
159 index dec5527..61b4431 100644
160 --- a/src/libcmis/sharepoint-document.cxx
161 +++ b/src/libcmis/sharepoint-document.cxx
162 @@ -37,14 +37,12 @@ using namespace libcmis;
164 SharePointDocument::SharePointDocument( SharePointSession* session ) :
165 libcmis::Object( session),
166 - libcmis::Document( session ),
167 SharePointObject( session )
171 SharePointDocument::SharePointDocument( SharePointSession* session, Json json, string parentId, string name ) :
172 libcmis::Object( session),
173 - libcmis::Document( session ),
174 SharePointObject( session, json, parentId, name )
177 diff --git a/src/libcmis/sharepoint-folder.cxx b/src/libcmis/sharepoint-folder.cxx
178 index e4da4a3..8bcb2db 100644
179 --- a/src/libcmis/sharepoint-folder.cxx
180 +++ b/src/libcmis/sharepoint-folder.cxx
181 @@ -38,14 +38,12 @@ using namespace libcmis;
183 SharePointFolder::SharePointFolder( SharePointSession* session ):
184 libcmis::Object( session ),
185 - libcmis::Folder( session ),
186 SharePointObject( session )
190 SharePointFolder::SharePointFolder( SharePointSession* session, Json json, string parentId ):
191 libcmis::Object( session ),
192 - libcmis::Folder( session ),
193 SharePointObject( session, json, parentId )
196 diff --git a/src/libcmis/ws-document.cxx b/src/libcmis/ws-document.cxx
197 index ba2f2bc..c085d5b 100644
198 --- a/src/libcmis/ws-document.cxx
199 +++ b/src/libcmis/ws-document.cxx
200 @@ -33,7 +33,6 @@ using libcmis::PropertyPtrMap;
202 WSDocument::WSDocument( const WSObject& object ) :
203 libcmis::Object( object ),
204 - libcmis::Document( const_cast< WSObject& >( object ).getSession( ) ),
208 diff --git a/src/libcmis/ws-folder.cxx b/src/libcmis/ws-folder.cxx
209 index 4e82ac2..aca0543 100644
210 --- a/src/libcmis/ws-folder.cxx
211 +++ b/src/libcmis/ws-folder.cxx
212 @@ -33,7 +33,6 @@ using libcmis::PropertyPtrMap;
214 WSFolder::WSFolder( const WSObject& object ) :
215 libcmis::Object( object ),
216 - libcmis::Folder( const_cast< WSObject& >( object ).getSession( ) ),