mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1006307 - Fix -Wuninitialized and -Wunused-variable warnings in widget/xpwidgets/GfxInfoBase.cpp. r=bjacob
This commit is contained in:
parent
78ae1f032d
commit
63b125908b
@ -216,6 +216,8 @@ inline void PadDriverDecimal(char *aString)
|
||||
inline bool
|
||||
ParseDriverVersion(const nsAString& aVersion, uint64_t *aNumericVersion)
|
||||
{
|
||||
*aNumericVersion = 0;
|
||||
|
||||
#if defined(XP_WIN)
|
||||
int a, b, c, d;
|
||||
char aStr[8], bStr[8], cStr[8], dStr[8];
|
||||
@ -238,12 +240,15 @@ ParseDriverVersion(const nsAString& aVersion, uint64_t *aNumericVersion)
|
||||
if (d < 0 || d > 0xffff) return false;
|
||||
|
||||
*aNumericVersion = GFX_DRIVER_VERSION(a, b, c, d);
|
||||
return true;
|
||||
#elif defined(ANDROID)
|
||||
// Can't use aVersion.ToInteger() because that's not compiled into our code
|
||||
// unless we have XPCOM_GLUE_AVOID_NSPR disabled.
|
||||
*aNumericVersion = atoi(NS_LossyConvertUTF16toASCII(aVersion).get());
|
||||
#endif
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -595,8 +595,10 @@ GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray<GfxDriverInfo>& info,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(XP_WIN) || defined(ANDROID)
|
||||
uint64_t driverVersion;
|
||||
ParseDriverVersion(adapterDriverVersionString, &driverVersion);
|
||||
#endif
|
||||
|
||||
uint32_t i = 0;
|
||||
for (; i < info.Length(); i++) {
|
||||
@ -747,9 +749,6 @@ GfxInfoBase::GetFeatureStatusImpl(int32_t aFeature,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
uint64_t driverVersion;
|
||||
ParseDriverVersion(adapterDriverVersionString, &driverVersion);
|
||||
|
||||
// Check if the device is blocked from the downloaded blocklist. If not, check
|
||||
// the static list after that. This order is used so that we can later escape
|
||||
// out of static blocks (i.e. if we were wrong or something was patched, we
|
||||
|
Loading…
Reference in New Issue
Block a user