sed "s:-Wall -Werror:-Wall:g" BaseTools/Source/C/Makefiles/header.makefile -i
sed "s:-Wall -Werror:-Wall:g" BaseTools/Conf/tools_def.template -i
sed "s:-Wall -Werror:-Wall:g" Conf/tools_def.txt -i
Test:
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1245:23: warning: unused variable ‘FileHandle’ [-Wunused-variable]
1245 | SHELL_FILE_HANDLE FileHandle;
| ^~~~~~~~~~
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1243:14: warning: unused variable ‘ArrayBuffer’ [-Wunused-variable]
1243 | CHAR16 * ArrayBuffer = NULL;
| ^~~~~~~~~~~
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1242:13: warning: unused variable ‘NewFileName’ [-Wunused-variable]
1242 | CHAR16 NewFileName[128] = {0};
| ^~~~~~~~~~~
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1241:14: warning: unused variable ‘LineBuff’ [-Wunused-variable]
1241 | CHAR16 *LineBuff = NULL;
| ^~~~~~~~
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:1240:13: warning: unused variable ‘OldLogFileName’ [-Wunused-variable]
1240 | CHAR16 OldLogFileName[] = L"test.txt";