Compile error with 9.62

Recently I updated Dynamic C from 9.25 to 9.62. But now it won’t compile my code anymore.
The error I get is “line 126 : ERROR SERLIB.LIB : Internal Error: Expression temporary stack usage.”

It’s on this code

while (serBwrFree() != BOUTBUFSIZE) {
    sleep(5);
}
result = serBwrite(buf, length);

Is there something wrong with it?

Which target board you are using…

I use RCM 2110.

The code is part of a function.

/*** Beginheader serWrite */
int serWrite(char port, char * buf, int length);
/*** endheader */
int serWrite(char port, char * buf, int length) {
int result;
int t;

result = 0;
if (port == 'B') {
while (serBwrFree() != BOUTBUFSIZE) {
sleep(5);
}
result = serBwrite(buf, length);
} else if (port == 'C') {
while (serCwrFree() != COUTBUFSIZE) {
sleep(5);
}
result = serCwrite(buf, length);
} else if (port == 'D') {
sleep(2);
while (serDwrFree() != DOUTBUFSIZE) {
sleep(5);
}
result = serDwrite(buf, length);
while (serDwrFree() != DOUTBUFSIZE) {
sleep(3);
}
}

    return result;
}

When I put the code outside the function on the place where I called the function, the code compiled with no problem.

I now have the same error with the modbus library of rabbit.

Is there a way to disable the error.