From f8fc2b2a2d78d583feec05382395392639215529 Mon Sep 17 00:00:00 2001 From: vro Date: Fri, 31 May 2013 17:29:27 +0400 Subject: [PATCH] 0023935: Compiler warnings on returning Handle from C functions in OCAF schemas The warning 4190 is disabled because a C++ object calling from C section is manipulating only in C++ (outside of C section). Second attempt to remove the warning: extern "C" is removed - everything works fine. But I tested it only on Windows. Removed "Create##schema" method at all: without "extern "C"" it is useless. Checked that in OCCT and Samples this method is unused. "new ##Schema" is used instead (like in StdDrivers.cxx, for an example). Also this approach is advised in Storage_Schema.cdl: -- For example, if ShapeSchema is the class -- inheriting from Storage_Schema and containing -- the description of your application data schema, -- you create a storage/retrieval algorithm as follows: -- Handle(ShapeSchema) s = new -- ShapeSchema; --- src/Storage/Storage_Macros.hxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Storage/Storage_Macros.hxx b/src/Storage/Storage_Macros.hxx index 62ecfb6c88..23665f390a 100755 --- a/src/Storage/Storage_Macros.hxx +++ b/src/Storage/Storage_Macros.hxx @@ -29,9 +29,6 @@ Standard_EXPORT Handle(Storage_CallBack) CallBackSelection(const TCollection_As // Read_TypeSelection // #define Storage_BEGIN_READ_SELECTION(schema) \ - extern "C" { \ - Standard_EXPORT Handle(Storage_Schema) Create##schema() { return new schema; } \ - } \ Handle(Storage_CallBack) schema::CallBackSelection(const TCollection_AsciiString& rt) const \ { \ Handle(Standard_Persistent) p; \ -- 2.20.1