From ba507b04e178f6a3b25003231ac2038a90d1d98c Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 18 Oct 2015 19:34:38 +0000 Subject: Silence -Wqual-cast warnings from GCC 5.2 There were a number of const qualifiers being cast away which caused warnings. This cluttered the output hiding real errors. Silence them by explicit casting. NFC. llvm-svn: 250662 --- lldb/source/Host/common/Host.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Host/common') diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index c2f07ecf6bb..e89f4def478 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -820,8 +820,8 @@ Host::LaunchProcessPosixSpawn(const char *exe_path, const ProcessLaunchInfo &lau #endif const char *tmp_argv[2]; - char * const *argv = (char * const*)launch_info.GetArguments().GetConstArgumentVector(); - char * const *envp = (char * const*)launch_info.GetEnvironmentEntries().GetConstArgumentVector(); + char * const *argv = const_cast(launch_info.GetArguments().GetConstArgumentVector()); + char * const *envp = const_cast(launch_info.GetEnvironmentEntries().GetConstArgumentVector()); if (argv == NULL) { // posix_spawn gets very unhappy if it doesn't have at least the program @@ -829,7 +829,7 @@ Host::LaunchProcessPosixSpawn(const char *exe_path, const ProcessLaunchInfo &lau // variables don't make it into the child process if "argv == NULL"!!! tmp_argv[0] = exe_path; tmp_argv[1] = NULL; - argv = (char * const*)tmp_argv; + argv = const_cast(tmp_argv); } #if !defined (__APPLE__) -- cgit v1.2.3