From: Matthijs K. <mat...@st...> - 2010-05-30 08:50:23
|
Hi, when reading the code, I found the following snippet in Hardware::write: if(picType->Name.IsSameAs("18F2450")|| picType->Name.IsSameAs("18F4450")) blockSizeHW=BLOCKSIZE_CODE_PIC18F2450; else if(picType->Name.IsSameAs("18F2221")|| picType->Name.IsSameAs("18F2321")|| picType->Name.IsSameAs("18F4221")|| picType->Name.IsSameAs("18F4321")) blockSizeHW=BLOCKSIZE_CODE_PIC18F2221; switch(picType->bitsPerWord()) { case 24: blockSizeHW=BLOCKSIZE_CODE_DSPIC; break; default: blockSizeHW=BLOCKSIZE_CODE; break; } AFAICS, the first if/else statement is useless here, since the switch statement will alwys set blockSizeHW, overriding any value set for those specific pic types. It seems an "else" is missing here? Gr. Matthijs |