Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Table of "safe" methods to suppress "unused parameter" warnings?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="David Brown, post: 5152239"] Such code may be inefficient on some compilers (and with some options) - if "x" has been passed in a register, the compiler may copy it onto the stack in order for it to have an address, even though the address is not used. I have yet to see any reason to why anyone would need something other than "(void) x;" as a way to say "do nothing with x". An endless supply of suggestions of macros that mess around with "x" in weird ways does not help anyone. (Tool-specific annotations such as gcc "unused" attribute or PC-Lint annotations can be a useful addition if you use those particular tools.) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Table of "safe" methods to suppress "unused parameter" warnings?
Top