reactos/dll/win32/shell32/dialogs
Joachim Henze a08b83a90b
[SHELL32] Fix 2 compiler warnings for the rls-cfg 'unused variable' (#6539)
I noticed it on releases/0.4.10 with the RosBEWin2.1.6 GCC4.7.2 *rls* configuration:

C:/0410rls/reactos/dll/win32/shell32/dialogs/filetypes.cpp: In function 'BOOL FileTypesDlg_InsertToLV(HWND, LPCWSTR, INT, LPCWSTR)':
C:/0410rls/reactos/dll/win32/shell32/dialogs/filetypes.cpp:663:9: warning: variable 'iLargeImage' set but not used [-Wunused-but-set-variable]
C:/0410rls/reactos/dll/win32/shell32/dialogs/filetypes.cpp: In function 'BOOL EditTypeDlg_UpdateEntryIcon(HWND, PEDITTYPE_DIALOG, LPCWSTR, INT)':
C:/0410rls/reactos/dll/win32/shell32/dialogs/filetypes.cpp:1040:9: warning: unused variable 'iLargeImage' [-Wunused-variable]

But I do assume, that MSVC compilers would also complain about that in *rls* cfg.

Please notice that before 0.4.10-dev-202-g 698cbc6184 which did splitup and restructure the code
this function was placed within the file folder_options.cpp and was named
InsertFileType(HWND hDlgCtrl, WCHAR * szName, PINT iItem, WCHAR * szFile)
and not yet within file_types.cpp with the new name
FileTypesDlg_InsertToLV(HWND hListView, LPCWSTR szName, INT iItem, LPCWSTR szFile)
Back then it did not have the iLargeImage variable yet, and it also didn't warn upon rls-cfg-compilation.
Therefore 0.4.10-dev-202-g 698cbc6184 from (#582) is indeed the *guilty revision* (2018-06-06).
It was done in the very first commit of that PR 2fe0eab721
It's bad practice to move and refactor/extend code in functionality within the very same commit, as it makes reviewing the changes much harder.

That assert never fired for the last 6 years, therefore it would have been okay also to strip it together with the variable, but using DBG_UNREFERENCED_LOCAL_VARIABLE(iLargeImage); allows to keep the assert for master.
2024-02-26 13:42:13 +01:00
..
dialogs.cpp [MSGINA] Convert shutdown/logoff boxes back to modal dialog boxes (#5114) 2023-07-14 15:02:40 +03:00
drive.cpp [SHELL32] Prevent a second call to Drive Properties dialog (#4888) 2022-11-20 21:10:11 +03:00
drvdefext.cpp [SHELL32] Improve disk properties pie chart (#5239) 2023-05-05 13:35:32 +02:00
drvdefext.h [SHELL] IShellExtInit::Initialize uses PCIDLIST_ABSOLUTE. CORE-16385 2019-09-29 12:09:02 +02:00
filedefext.cpp [SHELL32] Improve file properties dialog (#5852) 2023-10-30 15:34:03 +09:00
filedefext.h [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
filetypes.cpp [SHELL32] Fix 2 compiler warnings for the rls-cfg 'unused variable' (#6539) 2024-02-26 13:42:13 +01:00
folder_options.cpp [SHELL32] Tweak formatting and logging 2024-02-20 02:08:56 +01:00
folder_options.h [SHELL32] Split dialogs/folder_options.cpp (#582) 2018-06-06 14:04:50 +02:00
fprop.cpp [SHELL32] Show file / drive properties at the position where the mouse was. 2022-10-14 21:02:33 +02:00
general.cpp [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
recycler_prop.cpp [SHELL32] Recycle-Bin: Validate the MaxCapacity value with respect to the available disk space. (#1688) 2019-07-07 19:01:09 +02:00
view.cpp [SHELL32] Use wide char string literals. 2022-01-09 22:39:29 +01:00