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

#ignore_warnings - howto

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



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

#ignore_warnings - howto
PostPosted: Sun Sep 28, 2008 3:38 am     Reply with quote

Hello,

I tried to use
Code:
#ignore_warnings ALL
respectively
Code:
#ignore_warnings 203
with PCH V4.079, it seems to have no effect. A'm I missing anything?

Regards,
Frank
Guest








PostPosted: Sun Sep 28, 2008 5:08 am     Reply with quote

Hi

I use this:

#ignore_warnings 202,203

It kill the ERRORS from RS232... and while (true) warnings.

If using #ignore_warnings more than one, it reset to the last used.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Sep 28, 2008 11:31 am     Reply with quote

Thank you for the response. By trial and error, I found that #ignore_warnings didn't get always effective exactly at it's place in the source code.

I moved the selective #ignore_warnings xxx to the top of the respective source and the corresponding #ignore_warnings NONE to the end and everything is OK.
Ttelmah
Guest







PostPosted: Sun Sep 28, 2008 3:38 pm     Reply with quote

Remember that source code, is not scanned 'once', in a linear manner. In fact the typical compiler, performs about three scans, first attaching the .h stuff, then expanding macros etc., and only then actually starting to perform a conversion to C. Then after this, the optimiser scans again tidying things up. Things like RS232 routines, attach 'stubs' to the body code, actually generated by the #use statement. Also some types of error, only actually occur, when another completely different statement 'triggers' detection of the fault.
This is why the 'warnings', don't actually get detected where they might seem to occur (and also why sometimes the line pointed to by an error or warning, sometimes has little connection with where the actual fault is....)
As you have found, this means that you may have to trigger disabling the warnings, much earlier than seems 'logical'.

Best Wishes
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Sep 28, 2008 4:58 pm     Reply with quote

Yes, with some warnings,there may be a problem of an ambiguous location respectively the warning can be a result of a check above in the code.

But I had the case of two short functions with warning 208 (no value returned). Thus, everything is within the function definition here. My assumption is, that the compiler is assigning the #ignore_warnings preprocessor command to a a wrong location or doesn't correctly determine the region covered by a function.

But I can manage with #ignore_warnings assigned to a complete source file.

Thanks for your interest!
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