[erlang-questions] Couple of questions ...

Attila Rajmund Nohl attila.r.nohl@REDACTED
Tue Apr 12 10:44:36 CEST 2011


2011/4/12, Mike Oxford <moxford@REDACTED>:
> Unused function warning
> =====================================
> data_conn_make_inet_link(SrcIP, SrcPort, DstIP, DstPort) ->
>     #inet_link{ src=#inet_src{ip=SrcIP, port=SrcPort},
> dst=#inet_dst{ip=DstIP, port=DstPort}}.
>
> I want to put this in a "common header," but not every single file which
> uses the header will use
> this particular call.

Why do you want to put a function definition into header file? Either
put it into a library module or write a macro instead of a function.



More information about the erlang-questions mailing list