mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
Wsign-compare: Fixed all sign compare warnings in src
This commit addresses all warnings emitted from -Wunused-function in the C++ src. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -77,12 +77,12 @@ void GroveCircularLED::setLevel(uint8_t level, bool direction)
|
||||
|
||||
if (!direction)
|
||||
{
|
||||
for (int i=0; i<(LEDS_PER_INSTANCE * m_instances); i++)
|
||||
for (int i=0; i < static_cast<int>(LEDS_PER_INSTANCE * m_instances); i++)
|
||||
m_bitStates[i] = (i < level) ? m_highIntensity : m_lowIntensity;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i=0; i<(LEDS_PER_INSTANCE * m_instances); i++)
|
||||
for (int i=0; i< static_cast<int>(LEDS_PER_INSTANCE * m_instances); i++)
|
||||
m_bitStates[i] = (((LEDS_PER_INSTANCE * m_instances) - i) <= level)
|
||||
? m_highIntensity : m_lowIntensity;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ void GroveLEDBar::setBarLevel(uint8_t level, bool greenToRed, int barNumber)
|
||||
if (level > 10)
|
||||
level = 10;
|
||||
|
||||
if (barNumber >= m_instances)
|
||||
if (barNumber >= static_cast<int>(m_instances))
|
||||
barNumber = m_instances - 1;
|
||||
|
||||
int start = barNumber * LEDS_PER_INSTANCE;
|
||||
|
@ -121,7 +121,7 @@ void MY9221::setHighIntensityValue(int intensity)
|
||||
|
||||
void MY9221::setAll()
|
||||
{
|
||||
for (int i=0; i<(m_instances * LEDS_PER_INSTANCE); i++)
|
||||
for (int i=0; i< static_cast<int>(m_instances * LEDS_PER_INSTANCE); i++)
|
||||
m_bitStates[i] = m_highIntensity;
|
||||
|
||||
if (m_autoRefresh)
|
||||
@ -130,7 +130,7 @@ void MY9221::setAll()
|
||||
|
||||
void MY9221::clearAll()
|
||||
{
|
||||
for (int i=0; i<(m_instances * LEDS_PER_INSTANCE); i++)
|
||||
for (int i=0; i< static_cast<int>(m_instances * LEDS_PER_INSTANCE); i++)
|
||||
m_bitStates[i] = m_lowIntensity;
|
||||
|
||||
if (m_autoRefresh)
|
||||
@ -139,7 +139,7 @@ void MY9221::clearAll()
|
||||
|
||||
void MY9221::refresh()
|
||||
{
|
||||
for (int i=0; i<(m_instances * LEDS_PER_INSTANCE); i++)
|
||||
for (int i=0; i< static_cast<int>(m_instances * LEDS_PER_INSTANCE); i++)
|
||||
{
|
||||
if (i % 12 == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user