the cast police is looking for me.

This commit is contained in:
christos 2019-10-09 01:18:55 +00:00
parent 689f938f30
commit 7ea1cb15c2
3 changed files with 3 additions and 4 deletions

View File

@ -63,7 +63,7 @@ atf::process::argv_array
cargv_to_argv_and_free(char** l)
{
try {
atf::process::argv_array argv((const char* const*)l);
atf::process::argv_array argv(const_cast<const char* const*>(l));
atf_utils_free_charpp(l);
return argv;
} catch (...) {

View File

@ -498,7 +498,7 @@ decode(const std::string& s)
{
int count = 3;
c = 0;
while (--count >= 0 && (unsigned)(s[i] - '0') < 8)
while (--count >= 0 && static_cast<unsigned>(s[i] - '0') < 8)
c = (c << 3) + (s[i++] - '0');
break;
}

View File

@ -102,8 +102,7 @@ static
int
const_execvp(const char *file, const char *const *argv)
{
#define UNCONST(a) ((void *)(unsigned long)(const void *)(a))
return ::execvp(file, (char* const*)(UNCONST(argv)));
return ::execvp(file, const_cast<char* const*>(argv));
#undef UNCONST
}