From 30170a4153b4c4659423d2e2b9c9a6a3fdc31882 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 21 Jul 2017 01:35:44 +0200 Subject: [PATCH] cosmetics in error message --- include/simgrid/msg.h | 21 +++++++++------------ include/simgrid/s4u/Actor.hpp | 15 ++++++++------- include/simgrid/s4u/Comm.hpp | 12 +++++------- include/simgrid/s4u/ConditionVariable.hpp | 5 ++++- include/xbt/dict.h | 3 ++- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index 345b584d32..e13be7ce3b 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -169,35 +169,32 @@ XBT_PUBLIC(const char*) MSG_zone_get_property_value(msg_netzone_t as, const char XBT_PUBLIC(void) MSG_zone_set_property_value(msg_netzone_t netzone, const char* name, char* value); XBT_PUBLIC(void) MSG_zone_get_hosts(msg_netzone_t zone, xbt_dynar_t whereto); -static inline XBT_ATTRIB_DEPRECATED_v319( - "Use MSG_zone_get_root() instead: v3.19 will remove MSG_environment_get_routing_root() completely.") msg_netzone_t - MSG_environment_get_routing_root() +static inline XBT_ATTRIB_DEPRECATED_v319("Use MSG_zone_get_root() instead: v3.19 will turn this warning into an error.") + msg_netzone_t MSG_environment_get_routing_root() { return MSG_zone_get_root(); } -static inline XBT_ATTRIB_DEPRECATED_v319( - "Use MSG_zone_get_name() instead: v3.19 will remove MSG_environment_as_get_name() completely.") const - char* MSG_environment_as_get_name(msg_netzone_t zone) +static inline XBT_ATTRIB_DEPRECATED_v319("Use MSG_zone_get_name() instead: v3.19 will turn this warning into an error.") + const char* MSG_environment_as_get_name(msg_netzone_t zone) { return MSG_zone_get_name(zone); } static inline XBT_ATTRIB_DEPRECATED_v319( - "Use MSG_zone_get_by_name() instead: v3.19 will remove MSG_environment_as_get_by_name() completely.") msg_netzone_t + "Use MSG_zone_get_by_name() instead: v3.19 will turn this warning into an error.") msg_netzone_t MSG_environment_as_get_by_name(const char* name) { return MSG_zone_get_by_name(name); } -static inline XBT_ATTRIB_DEPRECATED_v319( - "Use MSG_zone_get_sons() instead: v3.19 will remove MSG_environment_as_get_routing_sons() completely.") xbt_dict_t - MSG_environment_as_get_routing_sons(msg_netzone_t zone) +static inline XBT_ATTRIB_DEPRECATED_v319("Use MSG_zone_get_sons() instead: v3.19 will turn this warning into an error.") + xbt_dict_t MSG_environment_as_get_routing_sons(msg_netzone_t zone) { xbt_dict_t res = xbt_dict_new_homogeneous(NULL); MSG_zone_get_sons(zone, res); return res; } static inline XBT_ATTRIB_DEPRECATED_v319( - "Use MSG_zone_get_property_value() instead: v3.19 will remove MSG_environment_as_get_property_value() completely.") - const char* MSG_environment_as_get_property_value(msg_netzone_t zone, const char* name) + "Use MSG_zone_get_property_value() instead: v3.19 will turn this warning into an error.") const + char* MSG_environment_as_get_property_value(msg_netzone_t zone, const char* name) { return MSG_zone_get_property_value(zone, name); } diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 99ede18be6..2560aa9a3b 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -293,7 +293,8 @@ template inline void sleep_for(std::chrono::duration inline void sleep_for(std::chrono::duration inline void sleep_for(std::chrono::durationput_init(); } /** Creates (but don't start) an async send to the mailbox @p dest */ - static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_init(): v3.20 will remove Comm::send_init() completely.") + static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_init(): v3.20 will turn this warning into an error.") send_init(MailboxPtr dest, void* data, int simulatedByteAmount) { return dest->put_init(data, simulatedByteAmount); } /** Creates and start an async send to the mailbox @p dest */ - static CommPtr XBT_ATTRIB_DEPRECATED_v320( - "Use Mailbox::put_async(): v3.20 will remove Comm::send_async() completely.") + static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_async(): v3.20 will turn this warning into an error.") send_async(MailboxPtr dest, void* data, int simulatedByteAmount) { return dest->put_async(data, simulatedByteAmount); } /** Creates (but don't start) an async recv onto the mailbox @p from */ - static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get_init(): v3.20 will remove Comm::recv_init() completely.") + static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get_init(): v3.20 will turn this warning into an error.") recv_init(MailboxPtr from) { return from->get_init(); } /** Creates and start an async recv to the mailbox @p from */ - static CommPtr XBT_ATTRIB_DEPRECATED_v320( - "Use Mailbox::get_async(): v3.20 will remove Comm::recv_async() completely.") + static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get_async(): v3.20 will turn this warning into an error.") recv_async(MailboxPtr from, void** data) { return from->get_async(data); diff --git a/include/simgrid/s4u/ConditionVariable.hpp b/include/simgrid/s4u/ConditionVariable.hpp index c40482fee1..5af34467d6 100644 --- a/include/simgrid/s4u/ConditionVariable.hpp +++ b/include/simgrid/s4u/ConditionVariable.hpp @@ -104,7 +104,10 @@ public: void notify_one(); void notify_all(); - XBT_ATTRIB_DEPRECATED_v319("Use notify_one(): v3.19 will remove notify() completely.") void notify() { notify_one(); } + XBT_ATTRIB_DEPRECATED_v319("Use notify_one(): v3.19 will change this warning into an error.") void notify() + { + notify_one(); + } }; using ConditionVariablePtr = ConditionVariable::Ptr; diff --git a/include/xbt/dict.h b/include/xbt/dict.h index ac3917c042..fd6edf573e 100644 --- a/include/xbt/dict.h +++ b/include/xbt/dict.h @@ -56,7 +56,8 @@ typedef struct s_xbt_dictelm { } s_xbt_dictelm_t; XBT_PUBLIC(xbt_dict_t) -XBT_ATTRIB_DEPRECATED_v319("Use xbt_dict_new_homogeneous(). v3.19 will turn this warning into an error") xbt_dict_new(); +XBT_ATTRIB_DEPRECATED_v319("Use xbt_dict_new_homogeneous(). v3.19 will turn this warning into an error.") + xbt_dict_new(); XBT_PUBLIC(xbt_dict_t) xbt_dict_new_homogeneous(void_f_pvoid_t free_ctn); XBT_PUBLIC(void) xbt_dict_free(xbt_dict_t * dict); XBT_PUBLIC(unsigned int) xbt_dict_size(xbt_dict_t dict); -- 2.20.1