Why return function is an error in CodeWarrior?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Why return function is an error in CodeWarrior?

502件の閲覧回数
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.

ラベル(1)
タグ(2)
0 件の賞賛
1 返信

395件の閲覧回数
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 件の賞賛