- 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
This commit is contained in:
Colin Finck 2008-03-09 11:53:14 +00:00
parent 54ab4d0d04
commit 6b6e759d1c
5 changed files with 16 additions and 19 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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);
//---------------------------------------------------------------------------------------
///

View file

@ -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;

View file

@ -13,11 +13,9 @@
<directory name="rgenstat">
<xi:include href="rgenstat/rgenstat.rbuild" />
</directory>
<!--
<directory name="sysreg">
<xi:include href="sysreg/sysreg.rbuild" />
</directory>
-->
<directory name="unicode">
<xi:include href="unicode/unicode.rbuild" />
</directory>