Fix minor GCC warnings
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7130 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
f39c8f241d
commit
2bae3414ba
2 changed files with 6 additions and 2 deletions
|
@ -308,6 +308,10 @@ params:
|
|||
SIZE_T cbSrcTot = sizeof(bufSrc), cbSrc = 0, cbSrcFree;
|
||||
TCHAR *bufOutput = 0, *pNewAlloc, *pD;
|
||||
SIZE_T cchAlloc, cbAlloc, cchFree;
|
||||
#ifndef _MSC_VER // Avoid GCC "may be used uninitialized in this function" warnings
|
||||
pD = NULL;
|
||||
cchAlloc = 0;
|
||||
#endif
|
||||
|
||||
pi.hProcess = pi.hThread = NULL;
|
||||
codepage = bOEM ? CP_OEMCP : CP_ACP;
|
||||
|
@ -424,7 +428,7 @@ parseLines:
|
|||
if (isMb && cbSrc < ++cbSrcChar) {
|
||||
goto readMore;
|
||||
}
|
||||
cchDstChar = MultiByteToWideChar(codepage, 0, pSrc, cbSrcChar, (WCHAR*) bufCh, 2);
|
||||
cchDstChar = MultiByteToWideChar(codepage, 0, (CHAR*)pSrc, cbSrcChar, (WCHAR*) bufCh, 2);
|
||||
}
|
||||
else { // DBCS --> DBCS:
|
||||
bufCh[0] = ((CHAR*)pSrc)[0], cchDstChar = 1; // Note: OEM codepage will be converted by LogMessage
|
||||
|
|
|
@ -4025,7 +4025,7 @@ int CEXEBuild::run_postbuild_cmds(const postbuild_cmd *cmds, const TCHAR *templa
|
|||
{
|
||||
const TCHAR *cmdstr = cmd->cmd, *searchstart = cmdstr;
|
||||
TCHAR *arg, *cmdstrbuf = NULL, *tmpbuf;
|
||||
for (; arg = _tcsstr(const_cast<TCHAR*>(searchstart), _T("%1"));) // While found, replace %1 with templatearg_pc1
|
||||
for (; (arg = _tcsstr(const_cast<TCHAR*>(searchstart), _T("%1")));) // While found, replace %1 with templatearg_pc1
|
||||
{
|
||||
const size_t cchtpc1 = _tcslen(templatearg_pc1);
|
||||
tmpbuf = (TCHAR*) malloc((_tcslen(cmdstr) + cchtpc1 + !0) * sizeof(TCHAR));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue