mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-10 09:40:53 +01:00
fix GCC53 compilation
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
8cb786d57e
commit
127b035930
@ -1732,7 +1732,7 @@ extern BOOLEAN gRemapSmBiosIsRequire; // syscl: pass arg
|
||||
|
||||
|
||||
//-----------------------------------
|
||||
void FreePool(const wchar_t * A);
|
||||
//void FreePool(const wchar_t * A);
|
||||
|
||||
VOID
|
||||
FixBiosDsdt (
|
||||
|
@ -51,7 +51,7 @@ XStringW::XStringW(const XStringW &aString)
|
||||
{
|
||||
DBG("Constructor(const XStringW &aString) : %s\n", aString.data());
|
||||
Init(aString.length());
|
||||
StrnCpy((const CHAR16*)aString.data(), (const CHAR16*)aString.length());
|
||||
XStringW::StrnCpy((const CHAR16*)aString.data(), aString.length());
|
||||
}
|
||||
|
||||
XStringW::XStringW(const wchar_t *S)
|
||||
@ -65,14 +65,14 @@ XStringW::XStringW(const wchar_t *S, UINTN count)
|
||||
{
|
||||
DBG("Constructor(const wchar_t *S, UINTN count) : %s, %d\n", S, count);
|
||||
Init(count);
|
||||
StrnCpy(S, count);
|
||||
XStringW::StrnCpy(S, count);
|
||||
}
|
||||
|
||||
XStringW::XStringW(const wchar_t aChar)
|
||||
{
|
||||
DBG("Constructor(const wchar_t aChar)\n");
|
||||
Init(1);
|
||||
StrnCpy(&aChar, 1);
|
||||
XStringW::StrnCpy(&aChar, 1);
|
||||
}
|
||||
|
||||
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
@ -132,7 +132,7 @@ void XStringW::StrnCpy(const wchar_t *buf, UINTN len)
|
||||
void XStringW::StrCpy(const wchar_t *buf)
|
||||
{
|
||||
if ( buf && *buf ) {
|
||||
StrnCpy(buf, StrLen(buf));
|
||||
XStringW::StrnCpy(buf, StrLen(buf));
|
||||
}else{
|
||||
SetLength(0); /* data()[0]=0 done in SetLength */
|
||||
}
|
||||
@ -154,13 +154,13 @@ void XStringW::StrnCat(const wchar_t *buf, UINTN len)
|
||||
inline void XStringW::StrCat(const wchar_t *buf)
|
||||
{
|
||||
if ( buf && *buf ) {
|
||||
StrnCat(buf, StrLen(buf));
|
||||
XStringW::StrnCat(buf, StrLen(buf));
|
||||
}
|
||||
}
|
||||
|
||||
void XStringW::StrCat(const XStringW &uneXStringWW)
|
||||
{
|
||||
StrnCat(uneXStringWW.data(), uneXStringWW.length());
|
||||
XStringW::StrnCat(uneXStringWW.data(), uneXStringWW.length());
|
||||
}
|
||||
|
||||
void XStringW::Delete(UINTN pos, UINTN count)
|
||||
@ -183,7 +183,7 @@ void XStringW::Insert(UINTN pos, const XStringW& Str)
|
||||
CopyMem(data(pos), Str.data(), Str.length()*sizeof(wchar_t));
|
||||
SetLength(length()+Str.length());
|
||||
}else{
|
||||
StrCat(Str);
|
||||
XStringW::StrCat(Str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,14 +245,14 @@ XStringW XStringW::basename() const
|
||||
{
|
||||
UINTN idx = RIdxOf(LPATH_SEPARATOR);
|
||||
if ( idx == MAX_UINTN ) return XStringW();
|
||||
return SubString(idx+1, length()-idx-1);
|
||||
return XStringW::SubString(idx+1, length()-idx-1);
|
||||
}
|
||||
|
||||
XStringW XStringW::dirname() const
|
||||
{
|
||||
UINTN idx = RIdxOf(LPATH_SEPARATOR);
|
||||
if ( idx == MAX_UINTN ) return XStringW();
|
||||
return SubString(0, idx);
|
||||
return XStringW::SubString(0, idx);
|
||||
}
|
||||
|
||||
XStringW XStringW::SubString(UINTN pos, UINTN count) const
|
||||
|
@ -66,7 +66,7 @@ BOOLEAN gBootChanged = FALSE;
|
||||
BOOLEAN gThemeOptionsChanged = FALSE;
|
||||
|
||||
EFI_FILE *OEMDir;
|
||||
CHAR16 *OEMPath = L"EFI\\CLOVER";
|
||||
CHAR16 *OEMPath;
|
||||
EFI_FILE *OemThemeDir = NULL;
|
||||
|
||||
|
||||
|
@ -118,10 +118,12 @@ extern UINTN AudioNum;
|
||||
extern HDA_OUTPUTS AudioList[20];
|
||||
extern EFI_AUDIO_IO_PROTOCOL *AudioIo;
|
||||
|
||||
#ifdef _cplusplus
|
||||
void FreePool(const wchar_t * A)
|
||||
{
|
||||
FreePool((VOID*)A);
|
||||
}
|
||||
#endif
|
||||
|
||||
static EFI_STATUS LoadEFIImageList(IN EFI_DEVICE_PATH **DevicePaths,
|
||||
IN CONST CHAR16 *ImageTitle,
|
||||
@ -526,7 +528,7 @@ VOID ReadSIPCfg()
|
||||
// text output from boot.efi when booting in graphics mode
|
||||
//
|
||||
EFI_STATUS EFIAPI
|
||||
NullConOutOutputString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *String) {
|
||||
NullConOutOutputString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CONST CHAR16 *String) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -1770,8 +1772,8 @@ BOOLEAN SetOEMPathIfExists(IN EFI_FILE *Root, IN CONST CHAR16 *path, CONST CHAR1
|
||||
|
||||
VOID SetOEMPath(CONST CHAR16 *ConfName)
|
||||
{
|
||||
OEMPath = L"EFI\\CLOVER";
|
||||
if (ConfName == NULL) {
|
||||
OEMPath = L"EFI\\CLOVER";
|
||||
DBG ("set OEMPath (ConfName == NULL): %s\n", OEMPath);
|
||||
} else if ( nLanCards > 0 && SetOEMPathIfExists(SelfRootDir, PoolPrint(L"EFI\\CLOVER\\OEM\\%a--%02x-%02x-%02x-%02x-%02x-%02x", gSettings.OEMProduct, gLanMac[0][0], gLanMac[0][1], gLanMac[0][2], gLanMac[0][3], gLanMac[0][4], gLanMac[0][5]), ConfName)) {
|
||||
} else if ( nLanCards > 1 && SetOEMPathIfExists(SelfRootDir, PoolPrint(L"EFI\\CLOVER\\OEM\\%a--%02x-%02x-%02x-%02x-%02x-%02x", gSettings.OEMProduct, gLanMac[1][0], gLanMac[1][1], gLanMac[1][2], gLanMac[1][3], gLanMac[1][4], gLanMac[1][5]), ConfName)) {
|
||||
@ -1783,7 +1785,6 @@ VOID SetOEMPath(CONST CHAR16 *ConfName)
|
||||
} else if (SetOEMPathIfExists(SelfRootDir, PoolPrint(L"EFI\\CLOVER\\OEM\\%a", gSettings.OEMBoard), ConfName)) {
|
||||
} else if (SetOEMPathIfExists(SelfRootDir, PoolPrint(L"EFI\\CLOVER\\OEM\\%a-%d", gSettings.OEMBoard, (INT32)(DivU64x32(gCPUStructure.CPUFrequency, Mega))), ConfName) ) {
|
||||
} else {
|
||||
OEMPath = L"EFI\\CLOVER";
|
||||
DBG ("set OEMPath by default: %s\n", OEMPath);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user