Commit 7852bc27 authored by Kamil Iskra's avatar Kamil Iskra

Fix compiler warnings

parent e423dadd
...@@ -275,7 +275,7 @@ void Container_manager::create_root_cgroups() ...@@ -275,7 +275,7 @@ void Container_manager::create_root_cgroups()
void Container_manager::migrate_service_os() void Container_manager::migrate_service_os()
{ {
system("for t in `cat /sys/fs/cgroup/cpuset/tasks`; do /bin/echo $t > /sys/fs/cgroup/cpuset/argo/service_os/tasks; done 2>/dev/null"); int n = system("for t in `cat /sys/fs/cgroup/cpuset/tasks`; do /bin/echo $t > /sys/fs/cgroup/cpuset/argo/service_os/tasks; done 2>/dev/null");
return; return;
vector<int> sos_tasks; vector<int> sos_tasks;
retrieve_from_file<int>( _cgroup_root + "cpuset/tasks", retrieve_from_file<int>( _cgroup_root + "cpuset/tasks",
...@@ -375,6 +375,9 @@ void Container_manager::load_existing_containers_as_root() ...@@ -375,6 +375,9 @@ void Container_manager::load_existing_containers_as_root()
Container_manager::~Container_manager() Container_manager::~Container_manager()
#if __cplusplus >= 201103L
noexcept(false)
#endif
{ {
std::ofstream ownership_map_file; std::ofstream ownership_map_file;
ownership_map_file.open(OWNERSHIP_MAP); ownership_map_file.open(OWNERSHIP_MAP);
...@@ -853,7 +856,7 @@ void Container_manager::reset() ...@@ -853,7 +856,7 @@ void Container_manager::reset()
clean_config(""); clean_config("");
/*Temporary ugly brutal hack [JZ] (\_/)*/ /*Temporary ugly brutal hack [JZ] (\_/)*/
system("rmdir /sys/fs/cgroup/cpuset/argo/argo_containers/ && rmdir /sys/fs/cgroup/cpuset/argo/"); int n = system("rmdir /sys/fs/cgroup/cpuset/argo/argo_containers/ && rmdir /sys/fs/cgroup/cpuset/argo/");
} }
void Container_manager::attach_to_container(string command) void Container_manager::attach_to_container(string command)
......
...@@ -223,7 +223,11 @@ class Container_manager ...@@ -223,7 +223,11 @@ class Container_manager
Container_manager(ILogger* logger, Container_manager(ILogger* logger,
Error_behavior error_behavior, Error_behavior error_behavior,
string cgroup_root = DEFAULT_CGROUP_ROOT); string cgroup_root = DEFAULT_CGROUP_ROOT);
~Container_manager(); ~Container_manager()
#if __cplusplus >= 201103L
noexcept(false)
#endif
;
inline const string* const get_argo_argo_container_root() const {return &_cgroup_root;} inline const string* const get_argo_argo_container_root() const {return &_cgroup_root;}
inline Error_behavior get_error_behaviour()const {return _error_behavior;} inline Error_behavior get_error_behaviour()const {return _error_behavior;}
......
...@@ -39,5 +39,5 @@ void Syslogger::log(Log_type type, const string& message, int errnum) ...@@ -39,5 +39,5 @@ void Syslogger::log(Log_type type, const string& message, int errnum)
{ {
string msg_out; string msg_out;
if(prepare_log(type, message, msg_out, errnum)) if(prepare_log(type, message, msg_out, errnum))
syslog(log_type_to_priority(type), msg_out.c_str()); syslog(log_type_to_priority(type), "%s", msg_out.c_str());
} }
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