mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-13 10:04:04 +01:00
eliminate VS2017 warnings
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
1ee664b022
commit
11bf50dc3a
@ -149,8 +149,8 @@ LOADER_ENTRY * DuplicateLoaderEntry(IN LOADER_ENTRY *Entry)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// DuplicateEntry = (__typeof__(DuplicateEntry))AllocateZeroPool(sizeof(LOADER_ENTRY));
|
||||
DuplicateEntry = new LOADER_ENTRY();
|
||||
DuplicateEntry = (__typeof__(DuplicateEntry))AllocateZeroPool(sizeof(LOADER_ENTRY));
|
||||
// DuplicateEntry = new LOADER_ENTRY();
|
||||
if (DuplicateEntry) {
|
||||
// DuplicateEntry->Tag = Entry->Tag;
|
||||
DuplicateEntry->AtClick = ActionEnter;
|
||||
|
@ -118,8 +118,8 @@ BOOLEAN AddLegacyEntry(IN CONST CHAR16 *FullTitle, IN CONST CHAR16 *LoaderTitle,
|
||||
VolDesc = (Volume->DiskKind == DISK_KIND_OPTICAL) ? L"CD" : L"HD";
|
||||
//DBG("VolDesc=%s\n", VolDesc);
|
||||
// prepare the menu entry
|
||||
// Entry = (__typeof__(Entry))AllocateZeroPool(sizeof(LEGACY_ENTRY));
|
||||
Entry = new LEGACY_ENTRY();
|
||||
Entry = (__typeof__(Entry))AllocateZeroPool(sizeof(LEGACY_ENTRY));
|
||||
// Entry = new LEGACY_ENTRY();
|
||||
if (FullTitle) {
|
||||
Entry->Title = EfiStrDuplicate(FullTitle);
|
||||
} else {
|
||||
@ -164,8 +164,8 @@ BOOLEAN AddLegacyEntry(IN CONST CHAR16 *FullTitle, IN CONST CHAR16 *LoaderTitle,
|
||||
SubScreen->TitleImage = Entry->Image;
|
||||
SubScreen->AnimeRun = SubScreen->GetAnime();
|
||||
// default entry
|
||||
// SubEntry = (__typeof__(SubEntry))AllocateZeroPool(sizeof(LEGACY_ENTRY));
|
||||
SubEntry = new LEGACY_ENTRY();
|
||||
SubEntry = (__typeof__(SubEntry))AllocateZeroPool(sizeof(LEGACY_ENTRY));
|
||||
// SubEntry = new LEGACY_ENTRY();
|
||||
SubEntry->Title = PoolPrint(L"Boot %s", LoaderTitle);
|
||||
// SubEntry->Tag = TAG_LEGACY;
|
||||
SubEntry->Volume = Entry->Volume;
|
||||
|
@ -556,7 +556,8 @@ STATIC LOADER_ENTRY *CreateLoaderEntry(IN CONST CHAR16 *LoaderPath,
|
||||
}
|
||||
|
||||
// prepare the menu entry
|
||||
Entry = new LOADER_ENTRY();
|
||||
Entry = (__typeof__(Entry))AllocateZeroPool(sizeof(LOADER_ENTRY));
|
||||
// Entry = new LOADER_ENTRY();
|
||||
// Entry->Tag = TAG_LOADER;
|
||||
Entry->Row = 0;
|
||||
Entry->Volume = Volume;
|
||||
|
@ -83,8 +83,8 @@ STATIC BOOLEAN AddToolEntry(IN CONST CHAR16 *LoaderPath, IN CONST CHAR16 *FullTi
|
||||
return FALSE;
|
||||
}
|
||||
// Allocate the entry
|
||||
// Entry = (__typeof__(Entry))AllocateZeroPool(sizeof(LOADER_ENTRY));
|
||||
Entry = new REFIT_MENU_ENTRY_LOADER_TOOL();
|
||||
Entry = (__typeof__(Entry))AllocateZeroPool(sizeof(*Entry));
|
||||
// Entry = new REFIT_MENU_ENTRY_LOADER_TOOL();
|
||||
if (Entry == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
@ -121,8 +121,8 @@ STATIC VOID AddCloverEntry(IN CONST CHAR16 *LoaderPath, IN CONST CHAR16 *LoaderT
|
||||
// EFI_STATUS Status;
|
||||
|
||||
// prepare the menu entry
|
||||
// Entry = (__typeof__(Entry))AllocateZeroPool(sizeof(LOADER_ENTRY));
|
||||
Entry = new REFIT_MENU_ENTRY_CLOVER();
|
||||
Entry = (__typeof__(Entry))AllocateZeroPool(sizeof(*Entry));
|
||||
// Entry = new REFIT_MENU_ENTRY_CLOVER();
|
||||
Entry->Title = LoaderTitle;
|
||||
// Entry->Tag = TAG_CLOVER;
|
||||
Entry->Row = 1;
|
||||
|
@ -399,7 +399,7 @@ public:
|
||||
UINTN mItemID;
|
||||
XPointer *mPointer;
|
||||
SCROLL_STATE ScrollState;
|
||||
MENU_STYLE_FUNC StyleFunc;
|
||||
// MENU_STYLE_FUNC StyleFunc;
|
||||
|
||||
|
||||
REFIT_MENU_SCREEN()
|
||||
@ -407,7 +407,7 @@ public:
|
||||
TimeoutSeconds(0), TimeoutText(0), Theme(0), AnimeRun(0),
|
||||
Once(0), LastDraw(0), CurrentFrame(0),
|
||||
Frames(0), FrameTime(0), FilmPlace({0,0,0,0}),
|
||||
Film(0), mAction(ActionNone), mItemID(0), StyleFunc(&REFIT_MENU_SCREEN::TextMenuStyle)
|
||||
Film(0), mAction(ActionNone), mItemID(0) //, StyleFunc(&REFIT_MENU_SCREEN::TextMenuStyle)
|
||||
{};
|
||||
|
||||
REFIT_MENU_SCREEN( UINTN ID_,
|
||||
|
@ -4371,8 +4371,8 @@ VOID NewEntry(REFIT_MENU_ENTRY_OTHER **Entry, REFIT_MENU_SCREEN **SubScreen, ACT
|
||||
VOID NewEntry(LOADER_ENTRY **Entry, REFIT_MENU_SCREEN **SubScreen, ACTION AtClick, UINTN ID, CONST CHAR8 *Title)
|
||||
{
|
||||
//create entry
|
||||
// *Entry = (__typeof_am__(*Entry))AllocateZeroPool(sizeof(LOADER_ENTRY)); // carefull, **Entry is not a LOADER_ENTRY. Don't use sizeof.
|
||||
*Entry = new LOADER_ENTRY();
|
||||
*Entry = (__typeof_am__(*Entry))AllocateZeroPool(sizeof(LOADER_ENTRY)); // carefull, **Entry is not a LOADER_ENTRY. Don't use sizeof.
|
||||
// *Entry = new LOADER_ENTRY();
|
||||
NewEntry_(*Entry, SubScreen, AtClick, ID, Title); // cast ok because super class
|
||||
}
|
||||
|
||||
@ -4412,9 +4412,9 @@ VOID ModifyTitles(REFIT_ABSTRACT_MENU_ENTRY *ChosenEntry)
|
||||
}
|
||||
}
|
||||
|
||||
VOID REFIT_MENU_SCREEN::AddMenuItem_(REFIT_MENU_ITEM_IEM_ABSTRACT* InputBootArgs, INTN Inx, CONST CHAR8 *Title, BOOLEAN Cursor)
|
||||
VOID REFIT_MENU_SCREEN::AddMenuItem_(REFIT_MENU_ITEM_IEM_ABSTRACT* InputBootArgs, INTN Inx, CONST CHAR8 *Line, BOOLEAN Cursor)
|
||||
{
|
||||
InputBootArgs->Title = PoolPrint(L"%a", Title);
|
||||
InputBootArgs->Title = PoolPrint(L"%a", Line);
|
||||
if (Inx == 3 || Inx == 116) {
|
||||
InputBootArgs->Row = 0;
|
||||
} else {
|
||||
@ -4435,17 +4435,17 @@ VOID REFIT_MENU_SCREEN::AddMenuItem_(REFIT_MENU_ITEM_IEM_ABSTRACT* InputBootArgs
|
||||
// AddMenuItem_(SubScreen, InputBootArgs, Inx, Title, Tag, Cursor);
|
||||
//}
|
||||
|
||||
VOID REFIT_MENU_SCREEN::AddMenuItemInput(INTN Inx, CONST CHAR8 *Title, BOOLEAN Cursor)
|
||||
VOID REFIT_MENU_SCREEN::AddMenuItemInput(INTN Inx, CONST CHAR8 *Line, BOOLEAN Cursor)
|
||||
{
|
||||
// REFIT_INPUT_DIALOG *InputBootArgs = (__typeof__(InputBootArgs))AllocateZeroPool(sizeof(REFIT_INPUT_DIALOG));
|
||||
REFIT_INPUT_DIALOG *InputBootArgs = new REFIT_INPUT_DIALOG;
|
||||
AddMenuItem_(InputBootArgs, Inx, Title, Cursor);
|
||||
AddMenuItem_(InputBootArgs, Inx, Line, Cursor);
|
||||
}
|
||||
|
||||
VOID REFIT_MENU_SCREEN::AddMenuItemSwitch(INTN Inx, CONST CHAR8 *Title, BOOLEAN Cursor)
|
||||
VOID REFIT_MENU_SCREEN::AddMenuItemSwitch(INTN Inx, CONST CHAR8 *Line, BOOLEAN Cursor)
|
||||
{
|
||||
REFIT_MENU_SWITCH *InputBootArgs = new REFIT_MENU_SWITCH;
|
||||
AddMenuItem_(InputBootArgs, Inx, Title, Cursor);
|
||||
AddMenuItem_(InputBootArgs, Inx, Line, Cursor);
|
||||
}
|
||||
|
||||
REFIT_MENU_ENTRY *SubMenuGraphics()
|
||||
|
Loading…
Reference in New Issue
Block a user