<div dir="ltr">On Sat, Apr 1, 2017 at 1:56 AM Erik Lindahl &lt;<a href="mailto:erik.lindahl@gmail.com">erik.lindahl@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Sat, Apr 1, 2017 at 12:31 AM, Eric Irrgang <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:ericirrgang@gmail.com" class="gmail_msg" target="_blank">ericirrgang@gmail.com</a>&gt;</span> wrote:<blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"> * Is there a Gromacs convention for dealing with unused<br></div></div></div></blockquote></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">   parameters in polymorphic methods to avoid compiler warnings</div><div class="gmail_msg">   and potential waste?</div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">&quot;gmx_unused&quot; is available, but don&#39;t go overboard with it. If you start to need it for more than a single parameters the method/class should probably be split into something simpler instead.</div></div></div></div></blockquote><div><br></div><div>On this particular topic, I would rather use the following approaches in new code (in a decreasing order of preference):</div><div><ul><li>Comment out the parameter name in the method declaration (if it is never used). This makes it very clear that the parameter is not used, since the compiler enforces it.</li><li>Use GMX_UNUSED_VALUE() if you need the parameter name for Doxygen (probably rare for polymorphic methods, since the base interface should document them), or if the parameter is unused only on some conditional compilation paths; the macro can make this explicit.<br></li><li>Use gmx_unused if nothing else works.</li></ul><div>Best regards,</div></div><div>Teemu</div></div></div>