This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

return statement executing problem

Hello:

When I Debug my program on F280049 through CCS9.2,I found that in the function1、function2, the return statements can not be executed but the it can be executed in the function3 and function4.  Can you help me check if there are any difference between these two functions?

function1:
static Uint16 PfcHeartCounter(Uint16 CountType,Uint16 uCount)
{
    if(CountType == 0)
    {
        uCount = IncreaseCounter(uCount);

    }
    else
    {
        uCount = DecreaseCounter(uCount);
    }
    return uCount;

}


function2:
static Uint16 IncreaseCounter(Uint16 Count)
{
    Count = (Count+1u)&0xFFu;
    return Count;
}


function3:
static Uint16 PfcHeartCounter(Uint16 CountType,Uint16 uCount)
{
    if(CountType == 0)
    {
        uCount = IncreaseCounter(uCount);
        return uCount;

    }
    else
    {
        uCount = DecreaseCounter(uCount);
        return uCount;
    }
}

function4:
static Uint16 IncreaseCounter(Uint16 Count)
{
    Count++;
    if(Count>255)
    {
        Count = 0;
    }
    return Count;
}