From: Colin Finck Date: Sun, 9 Mar 2008 11:53:14 +0000 (+0000) Subject: - It is enough to just add a "const" to fix the "deprecated conversion from string... X-Git-Tag: backups/hyperion@33110~453 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=6b6e759d1c778a35fbf1e48225cf25a8aa2fe47e - It is enough to just add a "const" to fix the "deprecated conversion from string constant to 'char*'" warning. Remove the TempName variable from the previous cabman commit and pass the temp file directly again. - Add the same "const"'s to sysreg, so that it compiles with gcc >= 4.2 as well svn path=/trunk/; revision=32619 --- diff --git a/reactos/tools/cabman/cabinet.cxx b/reactos/tools/cabman/cabinet.cxx index 3eaecad35be..c927bd730e3 100755 --- a/reactos/tools/cabman/cabinet.cxx +++ b/reactos/tools/cabman/cabinet.cxx @@ -1477,7 +1477,6 @@ ULONG CCabinet::NewCabinet() */ { ULONG Status; - CHAR const TempName[9] = { '~', 'C', 'A', 'B', '.', 't', 'm', 'p', '0' }; CurrentDiskNumber = 0; @@ -1529,7 +1528,7 @@ ULONG CCabinet::NewCabinet() return CAB_STATUS_NOMEMORY; } - Status = ScratchFile->Create(TempName); + Status = ScratchFile->Create("~CAB.tmp"); CreateNewFolder = false; diff --git a/reactos/tools/sysreg/os_support.cpp b/reactos/tools/sysreg/os_support.cpp index 85b0c08bb4d..e1a588a1237 100644 --- a/reactos/tools/sysreg/os_support.cpp +++ b/reactos/tools/sysreg/os_support.cpp @@ -122,7 +122,7 @@ __inline int gettimeofday(struct timeval *tv, struct timezone *tz) return ret; } - OsSupport::ProcessID OsSupport::createProcess(char *procname, int procargsnum, char **procargs, bool wait) + OsSupport::ProcessID OsSupport::createProcess(const char *procname, int procargsnum, const char **procargs, bool wait) { STARTUPINFO siStartInfo; PROCESS_INFORMATION piProcInfo; diff --git a/reactos/tools/sysreg/os_support.h b/reactos/tools/sysreg/os_support.h index ed8499d0fe7..25f69462685 100644 --- a/reactos/tools/sysreg/os_support.h +++ b/reactos/tools/sysreg/os_support.h @@ -69,7 +69,7 @@ namespace System_ /// /// - static ProcessID createProcess(char * procname, int procargsnum, char ** procargs, bool wait); + static ProcessID createProcess(const char * procname, int procargsnum, const char ** procargs, bool wait); //--------------------------------------------------------------------------------------- /// diff --git a/reactos/tools/sysreg/rosboot_test.cpp b/reactos/tools/sysreg/rosboot_test.cpp index 0a7c09fb028..502aaf7b43e 100644 --- a/reactos/tools/sysreg/rosboot_test.cpp +++ b/reactos/tools/sysreg/rosboot_test.cpp @@ -85,7 +85,7 @@ namespace Sysreg_ bool RosBootTest::executeBootCmd() { int numargs = 0; - char * args[128]; + const char * args[128]; char * pBuf; char szBuffer[128]; @@ -191,25 +191,25 @@ namespace Sysreg_ } remove(image.c_str ()); - char * options[] = {NULL, - "create", - "-f", + const char * options[] = {NULL, + "create", + "-f", #ifdef __LINUX__ - "raw", + "raw", #else - "vmdk", + "vmdk", #endif - NULL, - "100M", - NULL - }; + NULL, + "100M", + NULL + }; - options[0] = (char*)qemuimgdir.c_str(); - options[4] = (char*)image.c_str(); + options[0] = qemuimgdir.c_str(); + options[4] = image.c_str(); cerr << "Creating HDD Image ..." << image << endl; - OsSupport::createProcess ((char*)qemuimgdir.c_str(), 6, options, true); + OsSupport::createProcess (qemuimgdir.c_str(), 6, options, true); if (isFileExisting(image)) { m_HDDImage = image; diff --git a/reactos/tools/tools.rbuild b/reactos/tools/tools.rbuild index 1323814c1b0..f4817fbf554 100644 --- a/reactos/tools/tools.rbuild +++ b/reactos/tools/tools.rbuild @@ -13,11 +13,9 @@ -