From a7cc866fe80603a770c53b78b3f0a95ee93cc70a Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 4 Feb 2021 11:56:46 +0100 Subject: [PATCH] [sonar] Add attribute "noreturn". --- src/surf/xml/simgrid_dtd.h | 6 +++--- tools/cmake/MaintainerMode.cmake | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/surf/xml/simgrid_dtd.h b/src/surf/xml/simgrid_dtd.h index 0d422635d9..7558fc01ff 100644 --- a/src/surf/xml/simgrid_dtd.h +++ b/src/surf/xml/simgrid_dtd.h @@ -84,7 +84,7 @@ XBT_PUBLIC void STag_surfxml_link___ctn(void); XBT_PUBLIC void ETag_surfxml_link___ctn(void); XBT_PUBLIC void STag_surfxml_model___prop(void); XBT_PUBLIC void ETag_surfxml_model___prop(void); -XBT_PUBLIC void STag_surfxml_mount(void); +XBT_ATTRIB_NORETURN XBT_PUBLIC void STag_surfxml_mount(void); XBT_PUBLIC void ETag_surfxml_mount(void); XBT_PUBLIC void STag_surfxml_peer(void); XBT_PUBLIC void ETag_surfxml_peer(void); @@ -100,9 +100,9 @@ XBT_PUBLIC void STag_surfxml_route(void); XBT_PUBLIC void ETag_surfxml_route(void); XBT_PUBLIC void STag_surfxml_router(void); XBT_PUBLIC void ETag_surfxml_router(void); -XBT_PUBLIC void STag_surfxml_storage(void); +XBT_ATTRIB_NORETURN XBT_PUBLIC void STag_surfxml_storage(void); XBT_PUBLIC void ETag_surfxml_storage(void); -XBT_PUBLIC void STag_surfxml_storage___type(void); +XBT_ATTRIB_NORETURN XBT_PUBLIC void STag_surfxml_storage___type(void); XBT_PUBLIC void ETag_surfxml_storage___type(void); XBT_PUBLIC void STag_surfxml_trace(void); XBT_PUBLIC void ETag_surfxml_trace(void); diff --git a/tools/cmake/MaintainerMode.cmake b/tools/cmake/MaintainerMode.cmake index 8bf37e7842..5487904996 100644 --- a/tools/cmake/MaintainerMode.cmake +++ b/tools/cmake/MaintainerMode.cmake @@ -163,6 +163,7 @@ if(enable_maintainer_mode AND NOT WIN32) set(string1 "'s/extern /XBT_PUBLIC_DATA /'") set(string2 "'s/XBT_PUBLIC_DATA \\([^(]*\\)(/XBT_PUBLIC \\1(/'") set(string3 "'s/XBT_PUBLIC void STag_surfxml_include/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd + set(string4 "'s/XBT_PUBLIC void STag_surfxml_\\(mount\\|storage\\)/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd set(string5 "'s/SET(DOCTYPE)/SET(ROOT_dax__adag)/'") set(string9 "'s/#include /#if defined(_WIN32)\\n# ifndef __STRICT_ANSI__\\n# include \\n# include \\n# endif\\n#else\\n# include \\n#endif/g'") set(string14 "'\\!^ \\* Generated [0-9/]\\{10\\} [0-9:]\\{8\\}\\.$$!d'") @@ -195,6 +196,7 @@ if(enable_maintainer_mode AND NOT WIN32) COMMAND ${SED_EXE} -i ${string1} src/surf/xml/simgrid_dtd.h COMMAND ${SED_EXE} -i ${string2} src/surf/xml/simgrid_dtd.h COMMAND ${SED_EXE} -i ${string3} src/surf/xml/simgrid_dtd.h + COMMAND ${SED_EXE} -i ${string4} src/surf/xml/simgrid_dtd.h COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.h COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.h" -- 2.20.1