Why return function is an error in CodeWarrior?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why return function is an error in CodeWarrior?

497 Views
joonsinchu
Contributor II


Dear all,

 

Why am i keep getting this error by using return function in my coding?

 

can anyone explain and help me further on this CRC checksum coding ?

 

 

 

Your early reply is much appreciated.

 

Thank you.

Labels (1)
Tags (2)
0 Kudos
1 Reply

390 Views
BlackNight
NXP Employee
NXP Employee

Hi Joonsin,

you cannot return a value in a function which has a return type of 'void'.

So instead

void crc16(void) {

you have to write

int crc16(void) {

And the AS1_SencChar() after the return does not make any sense.

All these are basic C programming points.

I hope this helps,

Erich

0 Kudos