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
<blockquote data-quote="Kaz Kylheku" data-source="post: 5151541"><p>(void) x works even if x is a struct. Though the standard doesn't seem</p><p>to spell it out, any expression can be converted to void, which results</p><p>in a "void expression" that is evaluated for its side effects only.</p><p></p><p>Also, the void type is the only non-scalar type that may be used in a cast.</p><p>Furthermore, the constraint that the operand be scalar does not apply</p><p>if the cast is to (void).</p></blockquote><p></p>
[QUOTE="Kaz Kylheku, post: 5151541"] (void) x works even if x is a struct. Though the standard doesn't seem to spell it out, any expression can be converted to void, which results in a "void expression" that is evaluated for its side effects only. Also, the void type is the only non-scalar type that may be used in a cast. Furthermore, the constraint that the operand be scalar does not apply if the cast is to (void). [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Table of "safe" methods to suppress "unused parameter" warnings?
Top