bug 504917 - fix warnings in updater.cpp r=bsmedberg

This commit is contained in:
Brad Lassey 2009-07-21 03:25:37 -04:00
parent 802ab6f06d
commit 369aa0eb3d

View File

@ -190,6 +190,10 @@ public:
operator FILE*() {
return mFile;
}
FILE* get() {
return mFile;
}
private:
FILE* mFile;
@ -409,7 +413,7 @@ static int ensure_remove(const char *path)
return rv;
}
static FILE* ensure_open(const char *path, char* flags, int options)
static FILE* ensure_open(const char *path, const char* flags, unsigned int options)
{
ensure_write_permissions(path);
FILE* f = fopen(path, flags);
@ -459,7 +463,7 @@ static int copy_file(const char *spath, const char *dpath)
AutoFile sfile = fopen(spath, "rb");
if (sfile == NULL || fstat(fileno(sfile), &ss)) {
LOG(("copy_file: failed to open or stat: %p,%s,%d\n", sfile, spath, errno));
LOG(("copy_file: failed to open or stat: %p,%s,%d\n", sfile.get(), spath, errno));
return READ_ERROR;
}
@ -1168,11 +1172,12 @@ LaunchWinPostProcess(const WCHAR *appExe)
static void
LaunchCallbackApp(const NS_tchar *workingDir, int argc, NS_tchar **argv)
{
putenv("NO_EM_RESTART=");
putenv("MOZ_LAUNCHED_CHILD=1");
putenv(const_cast<char*>("NO_EM_RESTART="));
putenv(const_cast<char*>("MOZ_LAUNCHED_CHILD=1"));
// Run from the specified working directory (see bug 312360).
NS_tchdir(workingDir);
if(NS_tchdir(workingDir) != 0)
LOG(("Warning: chdir failed"));
#if defined(USE_EXECV)
execv(argv[0], argv);