Suppose I have a gen_server:
-module(myserver).
-behavior(gen_server).
-export([init/1, handle_call/3]).
init(Arg) -> % ...
handle_call(Request, From, State) -> % ...
Compiling this naturally produces a warning:
myserver.erl:2: Warning: undefined callback function handle_cast/2 (behaviour 'gen_server')
How do I deal with this warning if I my server isn't going to need handle_cast/2? Do I define a placeholder function just to satisfy the compiler? For example:
handle_cast(_Request, _State) -> unimplemented.
Or do I ignore/suppress the warning message?
What is the proper way to write a gen_server where not all callback functions will be used?