Fixed MinGW (GCC 4.5.2)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6530 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5bfd937bd2
commit
9950ce1432
12 changed files with 50 additions and 22 deletions
|
@ -2993,7 +2993,7 @@ int CEXEBuild::write_output(void)
|
|||
ERROR_MSG(_T("Error: can't allocate memory for finalize command\n"));
|
||||
return PS_ERROR;
|
||||
}
|
||||
*((unsigned char**)&arg) -= (UINT_PTR)cmdstr, *((unsigned char**)&arg) += (UINT_PTR)cmdstrbuf;
|
||||
arg -= ((UINT_PTR)cmdstr)/sizeof(TCHAR), arg += ((UINT_PTR)cmdstrbuf)/sizeof(TCHAR);
|
||||
_tcscpy(cmdstrbuf,cmdstr);
|
||||
cmdstr = cmdstrbuf;
|
||||
memmove(arg+cchbldoutfile, arg+2, (_tcslen(arg+2)+1)*sizeof(TCHAR));
|
||||
|
|
|
@ -362,9 +362,9 @@ end:
|
|||
}
|
||||
|
||||
IS=myGetProcAddress(MGA_InitiateShutdown);
|
||||
if (IS && !IS(NULL, NULL, 0, SHUTDOWN_RESTART | SHUTDOWN_FORCE_OTHERS | SHUTDOWN_GRACE_OVERRIDE, reason)
|
||||
|| !ExitWindowsEx(EWX_REBOOT, reason)
|
||||
)
|
||||
if ( (IS && !IS(NULL, NULL, 0, SHUTDOWN_RESTART | SHUTDOWN_FORCE_OTHERS | SHUTDOWN_GRACE_OVERRIDE, reason))
|
||||
|| (!ExitWindowsEx(EWX_REBOOT, reason))
|
||||
)
|
||||
ExecuteCallbackFunction(CB_ONREBOOTFAILED);
|
||||
}
|
||||
#endif//NSIS_SUPPORT_REBOOT
|
||||
|
|
|
@ -1031,6 +1031,10 @@ static INT_PTR CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
int available_set = 0;
|
||||
unsigned total, available;
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ * 1000) + __GNUC_MINOR__) < 4006
|
||||
available = 0; // warning: 'available' may be used uninitialized in this function
|
||||
#endif
|
||||
|
||||
GetUIText(IDC_DIR,dir);
|
||||
if (!is_valid_instpath(dir))
|
||||
error = NSIS_INSTDIR_INVALID;
|
||||
|
|
|
@ -1400,7 +1400,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
|
||||
case TOK_P_APPENDFILE:
|
||||
{
|
||||
WORD tok = 0, cp;
|
||||
WORD tok = 0, cp = 0;
|
||||
bool bom = false, forceEnc = false;
|
||||
TCHAR *param = line.gettoken_str(++tok), buf[9+1];
|
||||
my_strncpy(buf,param,COUNTOF(buf));
|
||||
|
|
|
@ -722,7 +722,7 @@ tstring& path_append_separator(tstring& path)
|
|||
{
|
||||
tstring::iterator ib = path.begin(), ie = path.end();
|
||||
if (ib != ie && !IsPathSeparator(*--ie))
|
||||
path.push_back(PLATFORM_PATH_SEPARATOR_C);
|
||||
path += PLATFORM_PATH_SEPARATOR_STR;
|
||||
return path;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ void writer_sink::write_string(const TCHAR *s, size_t size)
|
|||
if (m_build_unicode)
|
||||
{
|
||||
bool strEnd = false;
|
||||
TCHAR ch;
|
||||
TCHAR ch = L'\0';
|
||||
for (; size ; size--)
|
||||
{
|
||||
if (!strEnd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue