Repository: trafficserver Updated Branches: refs/heads/master e29555993 -> 22bb4923e
TS-2736: Add static_cast Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/22bb4923 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/22bb4923 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/22bb4923 Branch: refs/heads/master Commit: 22bb4923e8d06fc1adcfefafafcb7c97f5d485fc Parents: e295559 Author: Phil Sorber <[email protected]> Authored: Thu May 1 14:48:32 2014 -0600 Committer: Phil Sorber <[email protected]> Committed: Thu May 1 14:49:03 2014 -0600 ---------------------------------------------------------------------- mgmt/Main.cc | 2 +- proxy/Main.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/22bb4923/mgmt/Main.cc ---------------------------------------------------------------------- diff --git a/mgmt/Main.cc b/mgmt/Main.cc index e81ed85..a02d4bf 100644 --- a/mgmt/Main.cc +++ b/mgmt/Main.cc @@ -319,7 +319,7 @@ set_process_limits(int fds_throttle) ATS_UNUSED_RETURN(fscanf(fd, "%lu", &lim.rlim_max)); fclose(fd); REC_ReadConfigFloat(file_max_pct, "proxy.config.system.file_max_pct"); - lim.rlim_cur = lim.rlim_max = lim.rlim_max * file_max_pct; + lim.rlim_cur = lim.rlim_max = static_cast<rlim_t>(lim.rlim_max * file_max_pct); if (!setrlimit(RLIMIT_NOFILE, &lim) && !getrlimit(RLIMIT_NOFILE, &lim)) { fds_limit = (int) lim.rlim_cur; #ifdef MGMT_USE_SYSLOG http://git-wip-us.apache.org/repos/asf/trafficserver/blob/22bb4923/proxy/Main.cc ---------------------------------------------------------------------- diff --git a/proxy/Main.cc b/proxy/Main.cc index 8267c16..d46ebfd 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -808,7 +808,7 @@ adjust_sys_settings(void) ATS_UNUSED_RETURN(fscanf(fd, "%lu", &lim.rlim_max)); fclose(fd); REC_ReadConfigFloat(file_max_pct, "proxy.config.system.file_max_pct"); - lim.rlim_cur = lim.rlim_max = lim.rlim_max * file_max_pct; + lim.rlim_cur = lim.rlim_max = static_cast<rlim_t>(lim.rlim_max * file_max_pct); if (!setrlimit(RLIMIT_NOFILE, &lim) && !getrlimit(RLIMIT_NOFILE, &lim)) { fds_limit = (int) lim.rlim_cur; syslog(LOG_NOTICE, "NOTE: RLIMIT_NOFILE(%d):cur(%d),max(%d)",RLIMIT_NOFILE, (int)lim.rlim_cur, (int)lim.rlim_max);
