From d5255dec8405469f43337b00f8e6de84bf10239b Mon Sep 17 00:00:00 2001 From: shunf4 Date: Sat, 20 Apr 2024 12:48:57 +0800 Subject: [PATCH] make it build after mod --- C/7zWindows.h | 4 +++- C/Compiler.h | 2 ++ CPP/7zip/UI/FileManager/CopyDialog.cpp | 3 +-- CPP/7zip/UI/FileManager/CopyDialog.h | 2 +- CPP/7zip/UI/GUI/ExtractDialog.cpp | 6 +++--- CPP/7zip/UI/GUI/ExtractDialog.h | 2 +- build.cmd | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/C/7zWindows.h b/C/7zWindows.h index 42c6db8b..f229cbb9 100755 --- a/C/7zWindows.h +++ b/C/7zWindows.h @@ -10,6 +10,8 @@ # pragma clang diagnostic push #endif +#pragma warning(disable : 4255) + #if defined(_MSC_VER) #pragma warning(push) @@ -17,7 +19,7 @@ #if _MSC_VER == 1900 // for old kit10 versions -// #pragma warning(disable : 4255) // winuser.h(13979): warning C4255: 'GetThreadDpiAwarenessContext': +#pragma warning(disable : 4255) // winuser.h(13979): warning C4255: 'GetThreadDpiAwarenessContext': #endif // win10 Windows Kit: #endif // _MSC_VER diff --git a/C/Compiler.h b/C/Compiler.h index 185a52de..a56df4a0 100755 --- a/C/Compiler.h +++ b/C/Compiler.h @@ -69,6 +69,8 @@ #endif */ +#pragma warning(disable : 4255) + #if _MSC_VER > 1200 // -Wall warnings diff --git a/CPP/7zip/UI/FileManager/CopyDialog.cpp b/CPP/7zip/UI/FileManager/CopyDialog.cpp index f98a0c41..cb3b2a01 100755 --- a/CPP/7zip/UI/FileManager/CopyDialog.cpp +++ b/CPP/7zip/UI/FileManager/CopyDialog.cpp @@ -11,7 +11,6 @@ #include #include "Panel.h" #include "ViewSettings.h" -#ifdef LANG #include "LangUtils.h" using namespace NWindows; @@ -370,7 +369,7 @@ void CCopyDialog::ShowPathFreeSpace(UString & strPath) _freeSpace.SetText(strText); } -bool CCopyDialog::OnCommand(int code, int itemID, LPARAM lParam) +bool CCopyDialog::OnCommand(unsigned code, unsigned itemID, LPARAM lParam) { if (itemID == IDC_COPY) { diff --git a/CPP/7zip/UI/FileManager/CopyDialog.h b/CPP/7zip/UI/FileManager/CopyDialog.h index 55afb9cc..f4dc9706 100755 --- a/CPP/7zip/UI/FileManager/CopyDialog.h +++ b/CPP/7zip/UI/FileManager/CopyDialog.h @@ -21,7 +21,7 @@ class CCopyDialog: public NWindows::NControl::CModalDialog void OnButtonSetPath(); void OnButtonOpenPath(); void OnButtonAddFileName(); - bool OnCommand(int code, int itemID, LPARAM lParam); + bool OnCommand(unsigned code, unsigned itemID, LPARAM lParam) Z7_override; bool OnGetMinMaxInfo(PMINMAXINFO pMMI); void ShowPathFreeSpace(UString & strPath); diff --git a/CPP/7zip/UI/GUI/ExtractDialog.cpp b/CPP/7zip/UI/GUI/ExtractDialog.cpp index 4d45c868..12ea5f2f 100755 --- a/CPP/7zip/UI/GUI/ExtractDialog.cpp +++ b/CPP/7zip/UI/GUI/ExtractDialog.cpp @@ -574,11 +574,11 @@ void CExtractDialog::ShowPathFreeSpace(UString & strPath) } -bool CExtractDialog::OnCommand(int code, int itemID, LPARAM lParam) +bool CExtractDialog::OnCommand(unsigned code, unsigned itemID, LPARAM lParam) { if (itemID == IDC_EXTRACT_PATH) { -#ifdef NO_REGISTRY +#ifdef Z7_NO_REGISTRY if (code == EN_CHANGE) #else if (code == CBN_EDITCHANGE) @@ -590,7 +590,7 @@ bool CExtractDialog::OnCommand(int code, int itemID, LPARAM lParam) ShowPathFreeSpace(strPath); return true; } -#ifndef NO_REGISTRY +#ifndef Z7_NO_REGISTRY else if (code == CBN_SELCHANGE) { int nSel = _path.GetCurSel(); diff --git a/CPP/7zip/UI/GUI/ExtractDialog.h b/CPP/7zip/UI/GUI/ExtractDialog.h index 812a0189..7574e6ba 100755 --- a/CPP/7zip/UI/GUI/ExtractDialog.h +++ b/CPP/7zip/UI/GUI/ExtractDialog.h @@ -61,7 +61,7 @@ class CExtractDialog: public NWindows::NControl::CModalDialog virtual bool OnButtonClicked(unsigned buttonID, HWND buttonHWND) Z7_override; virtual void OnOK() Z7_override; void OnButtonOpenPath(); - virtual bool OnCommand(int code, int itemID, LPARAM lParam); + virtual bool OnCommand(unsigned code, unsigned itemID, LPARAM lParam) Z7_override; #ifndef Z7_NO_REGISTRY diff --git a/build.cmd b/build.cmd index a0255dd4..ecee05dc 100644 --- a/build.cmd +++ b/build.cmd @@ -1,5 +1,5 @@ @echo off -set OPTS=_SFX=1 PLATFORM=x64 +set OPTS=Z7_SFX=1 PLATFORM=x64 set LFLAGS=/DEBUG /SUBSYSTEM:WINDOWS,"5.02" @echo ^_^_^_^_^_ ^_ ^_ ^_^_ ^_^_