Fixed Plugin API compilation with /WX (#3551)

* Fixed Plugin API compilation with /WX

* Removed generic_ie.hpp from white list

Co-authored-by: lab_ddpqa <lab_ddpqa@intel.com>
This commit is contained in:
Ilya Lavrenov 2020-12-10 16:49:30 +03:00 committed by GitHub
parent 3bcac1641d
commit ca08c5b45c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 13 deletions

View File

@ -51,7 +51,7 @@ public:
*
* @param that An rvalue reference for the other LockedMemoryBase instance
*/
LockedMemoryBase(LockedMemoryBase&& that)
LockedMemoryBase(LockedMemoryBase&& that) noexcept
: _allocator(that._allocator), _handle(that._handle), _lockFlag(that._lockFlag), _offset(that._offset) {
that._locked = nullptr;
}

View File

@ -208,6 +208,9 @@ protected:
virtual ExecutableNetwork ImportNetworkImpl(std::istream& networkModel,
const RemoteContext::Ptr& context,
const std::map<std::string, std::string>& config) {
(void)networkModel;
(void)context;
(void)config;
THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str;
}

View File

@ -204,7 +204,8 @@ inline bool endsWith(const std::string& src, const char* with) {
inline std::string tolower(const std::string& s) {
std::string ret;
ret.resize(s.length());
std::transform(s.begin(), s.end(), ret.begin(), ::tolower);
std::transform(s.begin(), s.end(), ret.begin(),
[](char c) { return static_cast<char>(::tolower(static_cast<int>(c))); });
return ret;
}
} // namespace details

View File

@ -136,7 +136,7 @@ public:
*
* @return Returns `true` if an operation has completed successfully
*/
bool visit_attributes(ngraph::AttributeVisitor& visitor) override {
bool visit_attributes(ngraph::AttributeVisitor& /*visitor*/) override {
return true;
}
};

View File

@ -68,11 +68,11 @@ public:
}
if (auto ti_node = std::dynamic_pointer_cast<ngraph::op::TensorIterator>(op)) {
auto results = ti_node->get_body()->get_results();
auto params = ti_node->get_body()->get_parameters();
auto ti_params = ti_node->get_body()->get_parameters();
ngraph::NodeVector nResults, nParams;
for (const auto& res : results)
nResults.emplace_back(res);
for (const auto& param : params)
for (const auto& param : ti_params)
nParams.emplace_back(param);
ngraph::traverse_nodes(nResults, [&](std::shared_ptr<ngraph::Node> node) {
if (auto genNode = std::dynamic_pointer_cast<ngraph::op::GenericIE>(node)) {

View File

@ -253,7 +253,7 @@ struct parse_result {
*
* @return The parse_result.
*/
static parse_result ParseXml(const char* file_path) {
inline parse_result ParseXml(const char* file_path) {
#ifdef ENABLE_UNICODE_PATH_SUPPORT
std::wstring wFilePath = FileUtils::multiByteCharToWString(file_path);
const wchar_t* resolvedFilepath = wFilePath.c_str();

View File

@ -220,15 +220,12 @@ if(UNIX)
PLUGIN_API)
else()
ie_headers_compilation_with_custom_flags(TEST_SUFFIX PluginApiPedantic FLAGS "-Wpedantic"
HEADERS_TO_SKIP "generic_ie.hpp"
PLUGIN_API)
endif()
else()
# TODO: enable
# ie_headers_compilation_with_custom_flags(TEST_SUFFIX PluginApiWindowsAreErrors
# HEADERS_TO_SKIP "generic_ie.hpp"
# FLAGS "/we4996 /W4 /WX"
# PLUGIN_API)
ie_headers_compilation_with_custom_flags(TEST_SUFFIX PluginApiWindowsAreErrors
FLAGS "/we4996 /W4 /WX"
PLUGIN_API)
endif()
# ir serialization functional tests variables

View File

@ -94,6 +94,7 @@ namespace ngraph
public:
IndirectScalarValueAccessor(AT& ref)
: m_ref(ref)
, m_buffer()
{
}

View File

@ -40,6 +40,9 @@ namespace ngraph
public:
Output()
: m_node(nullptr)
, m_index(0)
, m_tensor(nullptr)
, m_inputs()
{
}

View File

@ -35,7 +35,9 @@ namespace ngraph
{
auto to_lower = [](const std::string& s) {
std::string rc = s;
std::transform(rc.begin(), rc.end(), rc.begin(), ::tolower);
std::transform(rc.begin(), rc.end(), rc.begin(), [](char c) {
return static_cast<char>(::tolower(static_cast<int>(c)));
});
return rc;
};
for (auto p : get().m_string_enums)