<div dir="ltr">I'm trying to convert my code base from using macros for logging to using inline functions, as advocated by Richard O'Keefe.<br><br>In an include (.hrl) file, I have inline function definitions like<br>
<br>-compile({inline, [{log_info,3}, ...]).<br><br>log_info(Line, Fmt, Args) -><br> ok = . %% Some code<br>...<br><br>However, if I include this file and don't use all of the inline functions, I get a compiler warning for each unused function:<br>
<br>warning:function ilog_error/3 is unused<br>... and more<br><br>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>
<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>