AnsweredAssumed Answered

How to to remove the warning in CW compiler  "Warning : C1404: Return expected:

Question asked by Anna Koteswararao on Jan 16, 2012
Latest reply on Jan 16, 2012 by Erich Styger


I am using the Codewarrior compiler in which i uses the both assembly and C code in a function. This is for HCS08 SG16 micro. I am facing an error like

Warning : C1404: Return expected in my function as below,



BYTE Get_IMask_Status(void)
      tpa                  ; Read contents of CCR to A
      and #0x08            ; isolate I mask bit
      asla                 ; shift left by one bit
      nsa                  ; nibble swap, Acc has the content of I bit


I have the above  function which retruns a BYTE,  but i  am reading that BYTE value from the Accumalator from the assembly code . but CW is throwing a error that return expected. But i am have not written the return statement in the C function but evenm though i am getting return indirectly from the A which is in assembly. is ther any way that i can remove this warning? Or how can i get the Accumulator value into C retun true.

Please reply to me.