From c3a9a7d2c584a7651426b3516f4e9991c8063e02 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 17 Feb 2012 15:17:52 -0600 Subject: Fixed many Clang type conversion warnings with static_cast --- src/option.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/option.cc') diff --git a/src/option.cc b/src/option.cc index 02ae3040..2843c775 100644 --- a/src/option.cc +++ b/src/option.cc @@ -133,7 +133,7 @@ void process_environment(const char ** envp, const string& tag, if (*q == '=') { try { - string value = string(*p, q - *p); + string value = string(*p, static_cast(q - *p)); if (! value.empty()) process_option(string("$") + buf, string(buf), scope, q + 1, value); } @@ -190,7 +190,7 @@ strings_list process_arguments(strings_list args, scope_t& scope) const char * value = NULL; if (const char * p = std::strchr(name, '=')) { - opt_name = string(name, p - name); + opt_name = string(name, static_cast(p - name)); value = ++p; DEBUG("option.args", " read option value from option: " << value); } else { -- cgit v1.2.3