For example in this function it warns me that iLed is an unused variable

Code: Select all
// Clear Screen to background colour
void CPanelCfg::ClearScreenBg()
{
int iLed ;
long offset ;
for(int driver = 0, iLed = 0 ; driver < iPanels ; driver++, iLed+=(iLedsPerPanel*3)) {
offset = HEADER_DL + ((long)iLed * IVALSIZE) ;
for(int i = 0 ; i < iLedsPerPanel ; i++, offset += IVALSIZE) {
// Set the background colour at the point
pDst->SetAt(offset+iBitOffsetR, bg.r) ;
pDst->SetAt(offset+iBitOffsetG, bg.g) ;
pDst->SetAt(offset+iBitOffsetB, bg.b) ;
}
}
}

Code: Select all
void CMemAppend::Dump()
{
BYTE *p = GetBuffer() ;
int e = (int)GetSize() ;
int n ;
int ll = 0x0F ;
char ch ;
printf("CMemAppend::Dump()\n") ;
n = 0 ;
for(int i = 0 ; i < e ; i++, p++) {
n = i & ll ;
if(n == 0)
printf("%04X:", i) ;
ch = *p ;
if(ch >= 0x20 && ch < 0x7f) {
printf("%c", ch) ;
} else {
printf("(%02x)", (int)ch) ;
}
if(n == ll)
printf("\n") ;
}
if(n != ll)
printf("\n") ;
}