AnsweredAssumed Answered

Warning : C2705: Possible loss of data

Question asked by Anders Johansson on Dec 13, 2016
Latest reply on Dec 13, 2016 by Anders Johansson

CodeWarrior 6.3 for HCS08.

Why do I get warning C2705 in the division statement below?

static void Do_SM_PostStateTasks(void)
{
  int8_t A;
  int8_t B;
  int8_t C;
 
  A = 10;
  B = 20;
  C = (A / B);  // <---- WARNING HERE - WHY
 
  SM.StateTimer = C;
}

Outcomes