diff --git a/Contrib/ExDLL/pluginapi.c b/Contrib/ExDLL/pluginapi.c index 4d78dcd1..8dea6e9e 100644 --- a/Contrib/ExDLL/pluginapi.c +++ b/Contrib/ExDLL/pluginapi.c @@ -69,7 +69,7 @@ void NSISCALL setuservariable(const int varnum, LPCTSTR var) lstrcpy(g_variables + varnum*g_stringsize, var); } -#ifdef _UNICODE +#ifdef UNICODE int NSISCALL PopStringA(LPSTR ansiStr) { LPWSTR wideStr = (LPWSTR) GlobalAlloc(GPTR, g_stringsize*sizeof(WCHAR)); diff --git a/Contrib/Library/LibraryLocal/LibraryLocal.cpp b/Contrib/Library/LibraryLocal/LibraryLocal.cpp index cf4807a8..ed8c18b7 100644 --- a/Contrib/Library/LibraryLocal/LibraryLocal.cpp +++ b/Contrib/Library/LibraryLocal/LibraryLocal.cpp @@ -41,11 +41,11 @@ int GetTLBVersion(tstring& filepath, DWORD& high, DWORD & low) hr = LoadTypeLib(fullpath, &typeLib); #else // If built without UNICODE, we still need to convert this string to a Unicode string. - WCHAR *ole_filename = WinWStrDupFromTChar(fullpath); + WCHAR *ole_filename = (WCHAR*) WinWStrDupFromTChar(fullpath); if (!ole_filename) return 0; hr = LoadTypeLib(ole_filename, &typeLib); free(ole_filename); -#endif +#endif //~ _UNICODE if (SUCCEEDED(hr)) { @@ -72,7 +72,7 @@ int GetTLBVersion(tstring& filepath, DWORD& high, DWORD & low) return 0; -#endif +#endif //~ _WIN32 } NSIS_ENTRYPOINT_TMAIN diff --git a/Contrib/Makensisw/utils.cpp b/Contrib/Makensisw/utils.cpp index d8918edc..db73e1c3 100644 --- a/Contrib/Makensisw/utils.cpp +++ b/Contrib/Makensisw/utils.cpp @@ -659,7 +659,7 @@ void AddTip(HWND hWnd,LPCTSTR lpszToolTip) { ti.cbSize = sizeof(TOOLINFO); ti.uFlags = TTF_IDISHWND; ti.hwnd = g_tip.tip_p; - ti.uId = (UINT) hWnd; + ti.uId = (UINT_PTR) hWnd; ti.lpszText = (LPTSTR) lpszToolTip; SendMessage(g_tip.tip, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti); } diff --git a/Contrib/Modern UI 2/Interface.nsh b/Contrib/Modern UI 2/Interface.nsh index ab2ca844..4acaa0c7 100644 --- a/Contrib/Modern UI 2/Interface.nsh +++ b/Contrib/Modern UI 2/Interface.nsh @@ -51,9 +51,11 @@ Var mui.Button.Back !insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF" ;Map *_NOSTRETCH legacy define to the correct *_STRETCH value + !verbose push 2 !insertmacro MUI_LEGACY_MAP_NOSTRETCH MUI_HEADERIMAGE_ "" !insertmacro MUI_LEGACY_MAP_NOSTRETCH MUI_WELCOMEFINISHPAGE_ "" !insertmacro MUI_LEGACY_MAP_NOSTRETCH MUI_UNWELCOMEFINISHPAGE_ "" + !verbose pop ;Default header images !ifdef MUI_HEADERIMAGE @@ -158,7 +160,7 @@ Var mui.Button.Back !macroend !macro MUI_HEADERIMAGE_INITHELPER_LOADIMAGE UN RTL IMGRESID PATH - GetDlgItem $mui.Header.Image $HWNDPARENT ${IMGRESID} ; Every mode doesn't use this variable but we have to reference it to avoid a compiler warning. + GetDlgItem $mui.Header.Image $HWNDPARENT ${IMGRESID} ; This variable is not used by every mode but we have to reference it to avoid a compiler warning. !if "${MUI_HEADERIMAGE_${UN}BITMAP${RTL}_STRETCH}" == "NoStretchNoCropNoAlign" diff --git a/Contrib/MultiUser/MultiUser.nsh b/Contrib/MultiUser/MultiUser.nsh index 2d864769..daabec28 100644 --- a/Contrib/MultiUser/MultiUser.nsh +++ b/Contrib/MultiUser/MultiUser.nsh @@ -199,7 +199,7 @@ Installer/uninstaller initialization !endif !ifndef MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE - !define MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE "Your user account does not have sufficient privileges to install $(^Name) for all users of this compuetr." + !define MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE "Your user account does not have sufficient privileges to install $(^Name) for all users of this computer." !endif !macroend diff --git a/Contrib/System/Source/System.c b/Contrib/System/Source/System.c index fccfc704..452240da 100644 --- a/Contrib/System/Source/System.c +++ b/Contrib/System/Source/System.c @@ -405,7 +405,7 @@ PLUGINFUNCTIONSHORT(Int64Op) #endif } - // operation + // Operation switch (*op) { case _T('+'): i1 += i2; break; diff --git a/Docs/src/history.but b/Docs/src/history.but index ca7a920f..e1b0322f 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -2403,7 +2403,7 @@ Released on October 23rd, 2004 \b Added some CppUnit tests -\b Both _=? and /D= now require a space before them so they can safely remove the space from $CMDLINE +\b Both _?= and /D= now require a space before them so they can safely remove the space from $CMDLINE \b Fixed a bug that caused the uninstaller CRC-check to fail if \R{packhdr}{!packhdr} created a non-512-bytes-aligned exehead diff --git a/Source/Plugins.cpp b/Source/Plugins.cpp index a297d332..3a4c0f10 100644 --- a/Source/Plugins.cpp +++ b/Source/Plugins.cpp @@ -67,7 +67,7 @@ typename C::value_type::second_type get_paired_value(const C& cntnr, const K& ke { return get_iterator(cntnr,key)->second; } -template +template V get_paired_value(const C& cntnr, const K& key, const V& defval) { typename C::const_iterator it = cntnr.find(key); diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 6ad9f5ef..2b688e8f 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -874,7 +874,7 @@ static void NSISCALL SetSizeText64(int dlgItem, int prefix, ULARGE_INTEGER kb64) int scale = LANG_GIGA; UINT intgr, fract; - if (kb64.HighPart) // 4TB+ ? + if (kb64.HighPart) // >= 4 TiB ? { kb64.QuadPart = NRT_U64Shr32(kb64.QuadPart, 20); // Convert from KiB to GiB // wsprintf only supports the I64 size specifier on WinXP+. diff --git a/Source/manifest.cpp b/Source/manifest.cpp index 7d2f8660..69ed5537 100644 --- a/Source/manifest.cpp +++ b/Source/manifest.cpp @@ -33,15 +33,15 @@ static bool isstrhexchars(const TCHAR*s,UINT cch) { while(cch-- && *s) { - const TCHAR c = *s++, clw = ((char)c) | 32; + const TCHAR c = *s++, clw = ((TCHAR)c) | 32; if (!(c >= '0' && c <= '9') && !(clw >= 'a' && clw <= 'f')) return false; } return true; } static const struct { const TCHAR *name, *guidstr; } g_soslmap[] = { - { _T("WinVista"), _T("{e2011457-1546-43c5-a5fe-008deee3d3f0}") }, - { _T("Win7"), _T("{35138b9a-5d96-4fbd-8e2d-a2440225f93a}") }, + { _T("WinVista"), _T("{e2011457-1546-43c5-a5fe-008deee3d3f0}") }, //msdn.microsoft.com/en-us/library/aa374191 + { _T("Win7"), _T("{35138b9a-5d96-4fbd-8e2d-a2440225f93a}") }, //msdn.microsoft.com/en-us/library/dd371711 { _T("Win8"), _T("{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}") }, //msdn.microsoft.com/en-us/library/hh848036 { _T("Win8.1"), _T("{1f676c76-80e1-4239-95bb-83d0f6d0da78}") }, //msdn.microsoft.com/en-us/library/windows/desktop/dn481241 { _T("Win10"), _T("{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}") } //blogs.msdn.com/b/chuckw/archive/2013/09/10/manifest-madness.aspx diff --git a/Source/script.cpp b/Source/script.cpp index 42f6150f..edc02c1b 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -69,10 +69,8 @@ static UINT read_line_helper(NStreamLineReader&lr, TCHAR*buf, UINT cch) } const bool unicode = lr.IsUnicode(); for(cch = 0;; ++cch) - { - TCHAR ch = buf[cch]; - if (!ch || NStream::IsNewline(ch, unicode)) break; - } + if (!buf[cch] || NStream::IsNewline(buf[cch], unicode)) + break; if (cch) eof = 0; // Read something, postpone EOF return ++cch - eof; } @@ -6134,7 +6132,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) return ret; } - // DLL name on the user machine + // DLL name on the users machine TCHAR tempDLL[NSIS_MAX_STRLEN]; wsprintf(tempDLL, _T("$PLUGINSDIR\\%") NPRIs, dllName.c_str()); @@ -6205,7 +6203,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) // First push dll args - int parmst=i; // we push em in reverse order + int parmst=i; // we push 'em in reverse order int nounloadmisused=0; for (; i < line.getnumtokens(); i++) { int w=parmst + (line.getnumtokens()-i - 1); diff --git a/Source/util.cpp b/Source/util.cpp index 4134d89a..a2872dc8 100644 --- a/Source/util.cpp +++ b/Source/util.cpp @@ -681,7 +681,7 @@ tstring get_executable_path(const TCHAR* argv0) { #else /* Linux/BSD/POSIX/etc */ const TCHAR *envpath = _tgetenv(_T("_")); if( envpath != NULL ) - return get_full_path( envpath ); + return get_full_path(envpath); else { char *path = NULL, *pathtmp; size_t len = 100;