|
|
View previous topic :: View next topic |
Author |
Message |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
#ignore_warnings - howto |
Posted: Sun Sep 28, 2008 3:38 am |
|
|
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
|
|
Posted: Sun Sep 28, 2008 5:08 am |
|
|
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
|
|
Posted: Sun Sep 28, 2008 11:31 am |
|
|
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
|
|
Posted: Sun Sep 28, 2008 3:38 pm |
|
|
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
|
|
Posted: Sun Sep 28, 2008 4:58 pm |
|
|
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! |
|
|
|
|
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
|