CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

_Return_ gives a compiler warning

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
heath.g



Joined: 20 Jun 2006
Posts: 6

View user's profile Send private message

_Return_ gives a compiler warning
PostPosted: Sun Aug 12, 2007 6:26 pm     Reply with quote

Under version 3 you could do this and it wouldnt return warning:

Code:

int8 ReturnTest(void)
{
#asm
      movlw    0x01
      movwf   _RETURN_
#endasm


Does anyone know how to stop the warning appearing. It doesnt effect the code, I just dont like warnings if the code is unaffected as the function works.

Warning is: Function not void and does not return a value ReturnTest

Thanks.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 12, 2007 6:55 pm     Reply with quote

Add this line after your pre-processor statements.
Code:
#ignore_warnings 208
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: _Return_ gives a compiler warning
PostPosted: Mon Aug 13, 2007 11:43 am     Reply with quote

heath.g wrote:
Under version 3 you could do this and it wouldnt return warning:

Code:

int8 ReturnTest(void)
{
#asm
      movlw    0x01
      movwf   _RETURN_
#endasm


Does anyone know how to stop the warning appearing. It doesnt effect the code, I just dont like warnings if the code is unaffected as the function works.

Warning is: Function not void and does not return a value ReturnTest

Thanks.

You could try this as well.
Code:
return (1);
heath.g



Joined: 20 Jun 2006
Posts: 6

View user's profile Send private message

PostPosted: Mon Aug 20, 2007 12:13 am     Reply with quote

PCM programmer wrote:
Add this line after your pre-processor statements.
Code:
#ignore_warnings 208


Thanks for that, I will use this.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group