<div dir="ltr"><div class="gmail_quote">2008/10/3 Edwin Fine <span dir="ltr"><<a href="mailto:erlang-questions_efine@usa.net">erlang-questions_efine@usa.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">Does this imply that every inline function in a .hrl file will be inserted into every single .erl file that includes it, even if it is unused? If not, then why have a compiler warning?<br></div></blockquote>
<div><br></div><div>No, the compiler will always remove unused local functions.</div><div><br></div><div>The compiler always warns for unused functions, to help you get rid of old functions that are no longer used.</div><div>
<br></div><div>I suppose it could be reasonable if the compiler suppressed the warning for functions that are defined in .hrl files</div><div>(in the same way that it only warns for unused records in .erl files, never in .hrl files). If there are no strong objections</div>
<div>either here or in the Erlang/OTP group, we might change that for R12B-5 release.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">
<br>Is there any way to overcome this without reverting back to using macros? <br><br>Can I get rid of just those warnings? Is there a way to suppress warnings for individual functions, like a -compile({suppress, [{wunused, [{log_info,3},{log_dbg,3}]}]})?<br>
<br></div>
</blockquote><div>There is currently no way to suppress individual warnings. We have been thinking about adding such a mechanism.</div><div><br></div><div>/Bjorn</div><div><br></div></div>-- <br>Björn Gustavsson, Erlang/OTP, Ericsson AB<br>
</div>