u8 Key; u8 VarItem; switch (Key) { case Kb_0 : ... case Kb_1 : ... case Kb_2 : ... case Kb_3 : ... case Kb_4 : ... case Kb_5 : ... case Kb_6 : ... case Kb_7 : ... case Kb_8 : ... case Kb_9 : ... case Kb_Min : ... case Kb_Enter : switch (VarItem) { case 0 : ... case 1 : ... case 2 : ... } }
When I compile above I got one warning warning: #516-D: transfer of control bypasses initialisation off: in the line near switch(VarItem). What is the meaning of this warning. When I ignore it, all works, but I do not like warnings ...
"... I do not see why ..."
A new definition can occur within a brace-enclosed block:
void Test(u8 num) { switch (num) { case 1: { long test = 12; break; } case 2: break; } }