From 5bed0cb4d76f77afbc7f4a09cbced8a4a99c4d19 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 11 Jan 2016 23:14:25 +0100 Subject: [PATCH] make MC compile with -Wmissing-declaration --- src/mc/RegionSnapshot.hpp | 3 ++- src/mc/mc_checkpoint.cpp | 5 +++-- src/mc/mc_dwarf.cpp | 6 +++--- src/mc/mc_dwarf_attrnames.cpp | 1 + src/mc/mc_dwarf_tagnames.cpp | 1 + src/mc/mc_global.cpp | 2 +- src/mc/mc_member.cpp | 2 ++ 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/mc/RegionSnapshot.hpp b/src/mc/RegionSnapshot.hpp index 04c1651a58..1ece645c94 100644 --- a/src/mc/RegionSnapshot.hpp +++ b/src/mc/RegionSnapshot.hpp @@ -224,7 +224,8 @@ public: }; RegionSnapshot privatized_region( - RegionType type, void *start_addr, void* data_addr, std::size_t size); + RegionType region_type, void *start_addr, void* permanent_addr, + std::size_t size, const RegionSnapshot* ref_region); RegionSnapshot dense_region( RegionType type, void *start_addr, void* data_addr, std::size_t size); simgrid::mc::RegionSnapshot sparse_region( diff --git a/src/mc/mc_checkpoint.cpp b/src/mc/mc_checkpoint.cpp index 9aa90a6977..fca86d0aee 100644 --- a/src/mc/mc_checkpoint.cpp +++ b/src/mc/mc_checkpoint.cpp @@ -35,6 +35,7 @@ #include "src/mc/mc_smx.h" #include "mc_hash.hpp" +#include "src/mc/RegionSnapshot.hpp" #include "src/mc/ObjectInformation.hpp" #include "src/mc/Frame.hpp" #include "src/mc/Variable.hpp" @@ -83,9 +84,9 @@ namespace simgrid { namespace mc { #ifdef HAVE_SMPI -simgrid::mc::RegionSnapshot privatized_region( +RegionSnapshot privatized_region( RegionType region_type, void *start_addr, void* permanent_addr, - std::size_t size, const simgrid::mc::RegionSnapshot* ref_region + std::size_t size, const RegionSnapshot* ref_region ) { size_t process_count = MC_smpi_process_count(); diff --git a/src/mc/mc_dwarf.cpp b/src/mc/mc_dwarf.cpp index e7a7b6c0b3..3886239296 100644 --- a/src/mc/mc_dwarf.cpp +++ b/src/mc/mc_dwarf.cpp @@ -132,7 +132,7 @@ enum class FormClass { RangeListPtr }; -XBT_PRIVATE +static TagClass classify_tag(int tag) { switch (tag) { @@ -191,7 +191,7 @@ TagClass classify_tag(int tag) * \param form The form (values taken from the DWARF spec) * \return An internal representation for the corresponding class * */ -XBT_PRIVATE +static FormClass classify_form(int form) { switch (form) { @@ -1270,4 +1270,4 @@ int dwarf_register_to_libunwind(int dwarf_register) } } -} \ No newline at end of file +} diff --git a/src/mc/mc_dwarf_attrnames.cpp b/src/mc/mc_dwarf_attrnames.cpp index 193379a657..a1e00e5725 100644 --- a/src/mc/mc_dwarf_attrnames.cpp +++ b/src/mc/mc_dwarf_attrnames.cpp @@ -7,6 +7,7 @@ /* Warning: autogenerated, do not edit! */ #include +#include #include diff --git a/src/mc/mc_dwarf_tagnames.cpp b/src/mc/mc_dwarf_tagnames.cpp index 19ee9af6ed..cb73e9d2c1 100644 --- a/src/mc/mc_dwarf_tagnames.cpp +++ b/src/mc/mc_dwarf_tagnames.cpp @@ -8,6 +8,7 @@ #include #include +#include "src/mc/mc_dwarf.hpp" #include diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index b1e8b480d2..76a2af2cfa 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -478,7 +478,7 @@ void MC_automaton_load(const char *file) } // TODO, fix cross-process access (this function is not used) -void MC_dump_stacks(FILE* file) +static void MC_dump_stacks(FILE* file) { int nstack = 0; for (auto const& stack : mc_model_checker->process().stack_areas()) { diff --git a/src/mc/mc_member.cpp b/src/mc/mc_member.cpp index 0a5040bf61..683f82f9ca 100644 --- a/src/mc/mc_member.cpp +++ b/src/mc/mc_member.cpp @@ -9,6 +9,8 @@ #include "src/mc/mc_object_info.h" #include "src/mc/mc_private.h" #include "src/mc/Type.hpp" +#include "src/mc/mc_dwarf.hpp" + namespace simgrid { namespace dwarf { -- 2.20.1