Remove unnecessary casts.

This commit is contained in:
jief 2023-11-07 11:29:52 +01:00
parent 0130602198
commit dbb93abca9
3 changed files with 7 additions and 7 deletions

View File

@ -907,7 +907,7 @@ LoadNvramPlist(
// //
// load nvram.plist // load nvram.plist
// //
Status = egLoadFile(RootDir, NVRAMPlistPath, (UINT8**)&NvramPtr, &Size); Status = egLoadFile(RootDir, NVRAMPlistPath, &NvramPtr, &Size);
if(EFI_ERROR(Status)) { if(EFI_ERROR(Status)) {
DBG(" not present\n"); DBG(" not present\n");
return Status; return Status;

View File

@ -483,7 +483,7 @@ EFI_STATUS LoadPlist(const XStringW& ConfName, C* plist)
{ {
EFI_STATUS Status = EFI_NOT_FOUND; EFI_STATUS Status = EFI_NOT_FOUND;
UINTN Size = 0; UINTN Size = 0;
CHAR8* ConfigPtr = NULL; UINT8* ConfigPtr = NULL;
// XStringW ConfigPlistPath; // XStringW ConfigPlistPath;
// XStringW ConfigOemPath; // XStringW ConfigOemPath;
@ -501,7 +501,7 @@ EFI_STATUS LoadPlist(const XStringW& ConfName, C* plist)
if ( selfOem.oemDirExists() ) { if ( selfOem.oemDirExists() ) {
configPlistPath = SWPrintf("%ls\\%ls.plist", selfOem.getOemFullPath().wc_str(), ConfName.wc_str()); configPlistPath = SWPrintf("%ls\\%ls.plist", selfOem.getOemFullPath().wc_str(), ConfName.wc_str());
if (FileExists (&selfOem.getOemDir(), configFilename)) { if (FileExists (&selfOem.getOemDir(), configFilename)) {
Status = egLoadFile(&selfOem.getOemDir(), configFilename.wc_str(), (UINT8**)&ConfigPtr, &Size); Status = egLoadFile(&selfOem.getOemDir(), configFilename.wc_str(), &ConfigPtr, &Size);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DBG("Cannot find %ls at path (%s): '%ls', trying '%ls'\n", configFilename.wc_str(), efiStrError(Status), selfOem.getOemFullPath().wc_str(), self.getCloverDirFullPath().wc_str()); DBG("Cannot find %ls at path (%s): '%ls', trying '%ls'\n", configFilename.wc_str(), efiStrError(Status), selfOem.getOemFullPath().wc_str(), self.getCloverDirFullPath().wc_str());
}else{ }else{
@ -512,7 +512,7 @@ EFI_STATUS LoadPlist(const XStringW& ConfName, C* plist)
if ( !selfOem.oemDirExists() || EFI_ERROR(Status)) { if ( !selfOem.oemDirExists() || EFI_ERROR(Status)) {
configPlistPath = SWPrintf("%ls\\%ls.plist", self.getCloverDirFullPath().wc_str(), ConfName.wc_str()); configPlistPath = SWPrintf("%ls\\%ls.plist", self.getCloverDirFullPath().wc_str(), ConfName.wc_str());
if ( FileExists(&self.getCloverDir(), configFilename.wc_str())) { if ( FileExists(&self.getCloverDir(), configFilename.wc_str())) {
Status = egLoadFile(&self.getCloverDir(), configFilename.wc_str(), (UINT8**)&ConfigPtr, &Size); Status = egLoadFile(&self.getCloverDir(), configFilename.wc_str(), &ConfigPtr, &Size);
} }
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DBG("Cannot find %ls at path '%ls' : %s\n", configFilename.wc_str(), self.getCloverDirFullPath().wc_str(), efiStrError(Status)); DBG("Cannot find %ls at path '%ls' : %s\n", configFilename.wc_str(), self.getCloverDirFullPath().wc_str(), efiStrError(Status));

View File

@ -2522,7 +2522,7 @@ GetListOfThemes ()
EFI_FILE_INFO *DirEntry; EFI_FILE_INFO *DirEntry;
XStringW ThemeTestPath; XStringW ThemeTestPath;
EFI_FILE *ThemeTestDir = NULL; EFI_FILE *ThemeTestDir = NULL;
CHAR8 *ThemePtr = NULL; UINT8 *ThemePtr = NULL;
UINTN Size = 0; UINTN Size = 0;
DbgHeader("GetListOfThemes"); DbgHeader("GetListOfThemes");
@ -2542,9 +2542,9 @@ GetListOfThemes ()
DBG("- [%02zu]: %ls", ThemeNameArray.size(), DirEntry->FileName); DBG("- [%02zu]: %ls", ThemeNameArray.size(), DirEntry->FileName);
Status = self.getThemesDir().Open(&self.getThemesDir(), &ThemeTestDir, DirEntry->FileName, EFI_FILE_MODE_READ, 0); Status = self.getThemesDir().Open(&self.getThemesDir(), &ThemeTestDir, DirEntry->FileName, EFI_FILE_MODE_READ, 0);
if (!EFI_ERROR(Status)) { if (!EFI_ERROR(Status)) {
Status = egLoadFile(ThemeTestDir, CONFIG_THEME_FILENAME, (UINT8**)&ThemePtr, &Size); Status = egLoadFile(ThemeTestDir, CONFIG_THEME_FILENAME, &ThemePtr, &Size);
if (EFI_ERROR(Status) || (ThemePtr == NULL) || (Size == 0)) { if (EFI_ERROR(Status) || (ThemePtr == NULL) || (Size == 0)) {
Status = egLoadFile(ThemeTestDir, CONFIG_THEME_SVG, (UINT8**)&ThemePtr, &Size); Status = egLoadFile(ThemeTestDir, CONFIG_THEME_SVG, &ThemePtr, &Size);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
Status = EFI_NOT_FOUND; Status = EFI_NOT_FOUND;
DBG(" - bad theme because %ls nor %ls can't be load", CONFIG_THEME_FILENAME, CONFIG_THEME_SVG); DBG(" - bad theme because %ls nor %ls can't be load", CONFIG_THEME_FILENAME, CONFIG_THEME_SVG);