MantisBT - CMake
View Issue Details
0009639CMakeCMakepublic2009-10-02 04:242011-06-06 18:25
Claudio Bley 
Bill Hoffman 
normaltweakN/A
closedfixed 
 
CMake 2.8.4 
0009639: gcc "deprecated conversion from string constant to char*" warnings
I don't like annoying warnings like these:

------------------------------------------------------------------------------
c:/build/CMake/Source/kwsys/SystemTools.cxx: In static member function 'static bool cmsys::SystemTools::WriteRegistryValue(const char*, const char*, cmsys::SystemTools::KeyWOW64)':
c:/build/CMake/Source/kwsys/SystemTools.cxx:740: warning: deprecated conversion from string constant to 'CHAR*'
[ 2%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/Registry.obj
c:/build/CMake/Source/kwsys/Registry.cxx: In member function 'virtual bool cmsys::RegistryHelper::Open(const char*, const char*, int)':
c:/build/CMake/Source/kwsys/Registry.cxx:406: warning: deprecated conversion from string constant to 'CHAR*'
...
c:/build/CMake/Source/cmGlobalVisualStudioGenerator.cxx: In function 'void WriteVSMacrosFileRegistryEntry(const std::string&, const std::string&, const std::string&)':
c:/build/CMake/Source/cmGlobalVisualStudioGenerator.cxx:622: warning: deprecated conversion from string constant to 'CHAR*'
[ 46%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmWin32ProcessExecution.obj
c:/build/CMake/Source/cmWin32ProcessExecution.cxx: In function 'BOOL RealPopenCreateProcess(const char*, const char*, const char*, void*, void*, void*, void**, bool, std::string&)':
c:/build/CMake/Source/cmWin32ProcessExecution.cxx:287: warning: deprecated conversion from string constant to 'char*'
------------------------------------------------------------------------------

The attached patch fixes these warnings.
No tags attached.
diff cmake_string_conversion_warning.diff (2,756) 2009-10-02 04:24
https://public.kitware.com/Bug/file/2509/cmake_string_conversion_warning.diff
Issue History
2009-10-02 04:24Claudio BleyNew Issue
2009-10-02 04:24Claudio BleyFile Added: cmake_string_conversion_warning.diff
2010-12-15 09:07David ColeStatusnew => assigned
2010-12-15 09:07David ColeAssigned To => Bill Hoffman
2011-02-03 18:23David ColeStatusassigned => resolved
2011-02-03 18:23David ColeFixed in Version => CMake 2.8.4
2011-02-03 18:23David ColeResolutionopen => fixed
2011-06-06 18:25David ColeStatusresolved => closed
2011-06-06 18:25David ColeNote Added: 0026689

Notes
(0026689)
David Cole   
2011-06-06 18:25   
Closing resolved issues that have not been updated in more than 3 months.