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 support@ccsinfo.com

warning suppression inside macros

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



Joined: 13 Apr 2010
Posts: 34
Location: UK

View user's profile Send private message

warning suppression inside macros
PostPosted: Thu May 13, 2010 3:23 am     Reply with quote

I have several macros in my code of the form..

Code:

#define DO_SOMETHING do { ..... } while(FALSE)



but when ever I use them I get warnings about condition always being false. That's a correct warning, but in this case I'd like to suppress it. I can do this by using #ignore_warnings, thus

Code:

#ignore_warnings 204
DO_SOMETHING;
#ignore_warnings NONE



However, it would be rather better if I could suppress the warning once inside the macro definition, but I can't find how to use #ignore_warnings inside the macro definition. Is there a way to do this, or another way to suppress this waring?
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