From ab98127a38c0a8c47f0c8656e095e995fdacfe5b Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 14 Feb 2017 02:34:32 +0100 Subject: [PATCH 1/1] tell sonar that we will never put our C wrappers in a C++ namespace --- src/simgrid/host.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index 30988adcff..f3c7b0bf57 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -12,12 +12,15 @@ #include #include "src/kernel/routing/NetPoint.hpp" +#include "src/simix/smx_host_private.h" #include "src/surf/HostImpl.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_host, sd, "Logging specific to sg_hosts"); -extern std::unordered_map - host_list; // FIXME: don't duplicate the content of s4u::Host this way +// FIXME: The following duplicates the content of s4u::Host +extern std::unordered_map host_list; + +extern "C" { void sg_host_exit() { @@ -122,7 +125,6 @@ void sg_host_msg_set(sg_host_t host, msg_host_priv_t smx_host) { } // ========== Simix layer ============= -#include "src/simix/smx_host_private.h" smx_host_priv_t sg_host_simix(sg_host_t host){ return host->extension(); } @@ -252,3 +254,5 @@ void sg_host_dump(sg_host_t host) } } } + +} // extern "C" -- 2.20.1