[erlang-questions] Couple of questions ...

James Hague james.hague@REDACTED
Tue Apr 12 16:11:51 CEST 2011


> It's old getting spammed with warnings about this.
> It's poor to have to turn off warnings at a global level.
> May I propose prepending something to suppress warning about it not being
> used?

Quoting from the compiler manual, there's an option to suppress this
warning for individual functions:

   {nowarn_unused_function, FAs}

   Turns off warnings for unused local functions as
nowarn_unused_function but only for the mentioned local functions.
   FAs is a tuple {Name,Arity} or a list of such tuples.

So you can just put lines like this in your included header:

   -compile({nowarn_unused_function, data_conn_make_inet_link/4}).



More information about the erlang-questions mailing list