Commit 5aa56598 authored by Dominik Charousset's avatar Dominik Charousset

Fix compiler warnings on GCC and Clang

parent a8894382
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
_Pragma("clang diagnostic ignored \"-Wweak-vtables\"") \ _Pragma("clang diagnostic ignored \"-Wweak-vtables\"") \
_Pragma("clang diagnostic ignored \"-Wused-but-marked-unused\"") \ _Pragma("clang diagnostic ignored \"-Wused-but-marked-unused\"") \
_Pragma("clang diagnostic ignored \"-Wdisabled-macro-expansion\"") \ _Pragma("clang diagnostic ignored \"-Wdisabled-macro-expansion\"") \
_Pragma("clang diagnostic ignored \"-Wunreachable-code\"") \
_Pragma("clang diagnostic ignored \"-Wsign-conversion\"") _Pragma("clang diagnostic ignored \"-Wsign-conversion\"")
# define CAF_POP_WARNINGS \ # define CAF_POP_WARNINGS \
_Pragma("clang diagnostic pop") _Pragma("clang diagnostic pop")
......
...@@ -235,6 +235,9 @@ void printer_loop(blocking_actor* self) { ...@@ -235,6 +235,9 @@ void printer_loop(blocking_actor* self) {
struct actor_data { struct actor_data {
std::string current_line; std::string current_line;
sink_handle redirect; sink_handle redirect;
actor_data() {
// nop
}
}; };
using data_map = std::map<actor_addr, actor_data>; using data_map = std::map<actor_addr, actor_data>;
sink_cache fcache; sink_cache fcache;
......
...@@ -67,8 +67,8 @@ node_id::node_id(uint32_t procid, const std::string& hash) ...@@ -67,8 +67,8 @@ node_id::node_id(uint32_t procid, const std::string& hash)
// nop // nop
} }
node_id::node_id(uint32_t procid, const host_id_type& host_id) node_id::node_id(uint32_t procid, const host_id_type& hid)
: data_(make_counted<data>(procid, host_id)) { : data_(make_counted<data>(procid, hid)) {
// nop // nop
} }
......
...@@ -410,7 +410,7 @@ bool engine::run(bool colorize, ...@@ -410,7 +410,7 @@ bool engine::run(bool colorize,
} }
unsigned percent_good = 100; unsigned percent_good = 100;
if (total_bad > 0) { if (total_bad > 0) {
auto tmp = (100000.0 * total_good) auto tmp = (100000.0 * static_cast<double>(total_good))
/ static_cast<double>(total_good + total_bad); / static_cast<double>(total_good + total_bad);
percent_good = static_cast<unsigned>(tmp / 1000.0); percent_good = static_cast<unsigned>(tmp / 1000.0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment