Counting Bugs in Windows Calculator

Counting Bugs in Windows Calculator

Calculator LocalizationSettings.h 180

wchar_t const
{
if (m_resolvedName == L”en-US”)
{
return ref new }
….
}
When viewing analyzer reports, I sort warnings by diagnostic code in ascending order, and this one, which makes quite a vivid example, happened to be the first on the list. CalcViewModel DateCalculator.cpp 279

public enum class _Enum_is_bitflag_ DateUnit
{
Year = 0x01,
Month = 0x02,
Week = 0x04,
Day = date,
DateUnit dateUnit, int difference)
{
switch (dateUnit)
{
case DateUnit::Year:
{
….
break;
}
case DateUnit::Month:
break;
case DateUnit::Week:
break;
}

return suspicious that the switch statement has no
DateUnit::Day case. CalcManager trans.cpp 276

Suspicious comparison of real numbers

V550 An odd precise comparison: ratio == threshold.

Source: habr.com