Skip to content
Browse files

Fix compiler warnings in demo scripts

  • Loading branch information...
1 parent bc58dfb commit aa296c2f17a72e6145945f45f6ae22d2ae0b00e7 Mihai Balea committed
Showing with 12 additions and 4 deletions.
  1. +6 −2 demo/demo.erl
  2. +6 −2 demo/demo_ssl.erl
View
8 demo/demo.erl
@@ -5,6 +5,10 @@
-compile(export_all).
-behaviour(gen_event).
+%% gen_event callbacks
+-export([init/1, handle_event/2, handle_call/2, handle_info/2,
+ terminate/2, code_change/3]).
+
main(_) ->
appmon:start(),
application:start(sasl),
@@ -36,7 +40,7 @@ handle_event({message, Client, #msg{ content = Content } = Msg}, State) ->
socketio_client:send(Client, #msg{ content = [{<<"echo">>, Content}], json = true}),
{ok, State};
-handle_event(E, State) ->
+handle_event(_E, State) ->
{ok, State}.
handle_call(_, State) ->
@@ -45,7 +49,7 @@ handle_call(_, State) ->
handle_info(_, State) ->
{ok, State}.
-terminate(_Reason, State) ->
+terminate(_Reason, _State) ->
ok.
code_change(_OldVsn, State, _Extra) ->
View
8 demo/demo_ssl.erl
@@ -5,6 +5,10 @@
-compile(export_all).
-behaviour(gen_event).
+%% gen_event callbacks
+-export([init/1, handle_event/2, handle_call/2, handle_info/2,
+ terminate/2, code_change/3]).
+
main(_) ->
appmon:start(),
application:start(sasl),
@@ -39,7 +43,7 @@ handle_event({message, Client, #msg{ content = Content } = Msg}, State) ->
socketio_client:send(Client, #msg{ content = [{<<"echo">>, Content}], json = true}),
{ok, State};
-handle_event(E, State) ->
+handle_event(_E, State) ->
{ok, State}.
handle_call(_, State) ->
@@ -48,7 +52,7 @@ handle_call(_, State) ->
handle_info(_, State) ->
{ok, State}.
-terminate(_Reason, State) ->
+terminate(_Reason, _State) ->
ok.
code_change(_OldVsn, State, _Extra) ->

0 comments on commit aa296c2

Please sign in to comment.
Something went wrong with that request. Please try again.